From 3686dedb4bfbd0e6630c10119c8fe7af9369248e Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 25 Oct 2017 17:50:22 +0200 Subject: add test to ensure `setup.cfg` interpolation behavior remain unchanged --- setuptools/tests/test_config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index cdfa5af4..2494a0bc 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -3,6 +3,7 @@ import pytest from distutils.errors import DistutilsOptionError, DistutilsFileError from setuptools.dist import Distribution from setuptools.config import ConfigHandler, read_configuration +from setuptools.extern.six.moves.configparser import InterpolationMissingOptionError class ErrConfigHandler(ConfigHandler): @@ -306,6 +307,15 @@ class TestMetadata: with get_dist(tmpdir) as dist: assert set(dist.metadata.classifiers) == expected + def test_interpolation(self, tmpdir): + fake_env( + tmpdir, + '[metadata]\n' + 'description = %(message)s\n' + ) + with pytest.raises(InterpolationMissingOptionError): + with get_dist(tmpdir): + pass class TestOptions: -- cgit v1.2.3