summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/tests/test_config.py')
-rw-r--r--setuptools/tests/test_config.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py
index 2fa0b374..d8347c78 100644
--- a/setuptools/tests/test_config.py
+++ b/setuptools/tests/test_config.py
@@ -103,7 +103,7 @@ class TestConfigurationReader:
'version = attr: none.VERSION\n'
'keywords = one, two\n'
)
- with pytest.raises(ImportError):
+ with pytest.raises(DistutilsOptionError):
read_configuration('%s' % config)
config_dict = read_configuration(
@@ -300,6 +300,18 @@ class TestMetadata:
with get_dist(tmpdir) as dist:
assert dist.metadata.version == '2016.11.26'
+ subpack.join('submodule.py').write(
+ 'import third_party_module\n'
+ 'VERSION = (2016, 11, 26)'
+ )
+
+ config.write(
+ '[metadata]\n'
+ 'version = attr: fake_package.subpackage.submodule.VERSION\n'
+ )
+ with get_dist(tmpdir) as dist:
+ assert dist.metadata.version == '2016.11.26'
+
def test_version_file(self, tmpdir):
_, config = fake_env(