File test/setup.py artifact 75184c3ebc part of check-in 85f6aa649a


# type: test
# title: setup()
# description: probe for prepared attributes
# version: 0.7
# 
# distutils bad

import pytest
import pluginconf
import pluginconf.setup
import setuptools


@pytest.fixture
def pmd():
    return pluginconf.plugin_meta(module="pluginconf")

attr = {}
def _record(**kwargs):
    attr.update(kwargs)


def attributes(mocker, pmd):

    stop = mocker.patch('setuptools.setup', _record)
    pluginconf.setup.setup(
        fn="pluginconf/__init__.py",
    )
    
    assert attr["classifiers"]
    assert attr["project_urls"]
    assert attr["packages"] == ['pluginconf', 'test']
    assert attr["long_description_content_type"] == 'text/markdown'
    assert attr["license"] == 'PD'
    assert attr["keywords"] == 'config'
    assert attr["long_description"].find("meta data") > 0