Skip to content

Commit 3686ded

Browse files
committed
add test to ensure setup.cfg interpolation behavior remain unchanged
1 parent 403bfce commit 3686ded

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setuptools/tests/test_config.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from distutils.errors import DistutilsOptionError, DistutilsFileError
44
from setuptools.dist import Distribution
55
from setuptools.config import ConfigHandler, read_configuration
6+
from setuptools.extern.six.moves.configparser import InterpolationMissingOptionError
67

78

89
class ErrConfigHandler(ConfigHandler):
@@ -306,6 +307,15 @@ def test_classifiers(self, tmpdir):
306307
with get_dist(tmpdir) as dist:
307308
assert set(dist.metadata.classifiers) == expected
308309

310+
def test_interpolation(self, tmpdir):
311+
fake_env(
312+
tmpdir,
313+
'[metadata]\n'
314+
'description = %(message)s\n'
315+
)
316+
with pytest.raises(InterpolationMissingOptionError):
317+
with get_dist(tmpdir):
318+
pass
309319

310320
class TestOptions:
311321

0 commit comments

Comments
 (0)