From 30bb58f069cf1624f35cfbdb725e8e443ff64330 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 28 Sep 2013 12:14:12 -0500 Subject: Added a legacy fallback test Added in code to after a deprecation warning parse the .svn files Should also parse externals. --HG-- extra : rebase_source : 9dd3bcf22cb56eb0826051f9e477f155e47cdbf6 --- setuptools/tests/test_egg_info.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'setuptools/tests') diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 95667b69..7abafd71 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -48,6 +48,27 @@ class TestEggInfo(unittest.TestCase): rev = egg_info.egg_info.get_svn_revision() self.assertEqual(rev, '89000') + def test_version_10_format_legacy_parser(self): + """ + """ + path_variable = None + for env in os.environ: + if env.lower() == 'path': + path_variable = env + + if path_variable is None: + self.skipTest('Cannot figure out how to modify path') + + old_path = os.environ[path_variable] + os.environ[path_variable] = '' + try: + self._write_entries(ENTRIES_V10) + rev = egg_info.egg_info.get_svn_revision() + finally: + os.environ[path_variable] = old_path + + self.assertEqual(rev, '89000') + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__) -- cgit v1.2.3