From e7a27ca0a3ba06f69836872342089e7333f24a3a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 31 Mar 2016 10:40:36 -0400 Subject: Extract separate test for test_environment_markers in test_resources. Remove unused variable. --- pkg_resources/tests/test_resources.py | 8 ++++++-- setuptools/tests/test_egg_info.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 1e176771..3a8c8e54 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -182,8 +182,12 @@ class TestDistro: msg = 'Foo 0.9 is installed but Foo==1.2 is required' assert vc.value.report() == msg - ws = WorkingSet([]) # reset - # Environment markers are evaluated at resolution time + def test_environment_markers(self): + """ + Environment markers are evaluated at resolution time. + """ + ad = pkg_resources.Environment([]) + ws = WorkingSet([]) res = ws.resolve(parse_requirements("Foo;python_version<'2'"), ad) assert list(res) == [] diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 6aed315f..fd5f26fc 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -123,7 +123,7 @@ class TestEggInfo(object): def test_tests_require_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """tests_require=["barbazquux;python_version<'2'"],""") - data = self._run_install_command( + self._run_install_command( tmpdir_cwd, env, cmd=['test'], output="Ran 0 tests in") assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] @@ -154,7 +154,7 @@ class TestEggInfo(object): if code: raise AssertionError(data) if output: - assert output in data + assert output in data def _find_egg_info_files(self, root): class DirList(list): -- cgit v1.2.1