diff options
author | Philip Thiem <ptthiem@gmail.com> | 2013-12-07 00:13:19 -0600 |
---|---|---|
committer | Philip Thiem <ptthiem@gmail.com> | 2013-12-07 00:13:19 -0600 |
commit | 8bbdac7d065e408f3f320e4523274e10e1c469fc (patch) | |
tree | 93f0ea26a7f2108c4f114f0c21e96e05f69724d5 /setuptools/tests/environment.py | |
parent | 727a101b0a76bd93c35b41352b2a52ca261a8cf7 (diff) | |
download | external_python_setuptools-8bbdac7d065e408f3f320e4523274e10e1c469fc.tar.gz external_python_setuptools-8bbdac7d065e408f3f320e4523274e10e1c469fc.tar.bz2 external_python_setuptools-8bbdac7d065e408f3f320e4523274e10e1c469fc.zip |
Modified setuptools.test.environment.ZipEnvironment to not choke on a bypassed
setUp.
test_egg_info, test_sdist, and test_svn all had tests that needed to be
bypassed when svn was not present. tests.py26compat contains a SkipIf
decorator for skipping. This worked after ironing a few wrinkles. The
conditions is evaluated and stored in test_svn._svn_check.
Diffstat (limited to 'setuptools/tests/environment.py')
-rw-r--r-- | setuptools/tests/environment.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/setuptools/tests/environment.py b/setuptools/tests/environment.py index bd2c53d2..476d280a 100644 --- a/setuptools/tests/environment.py +++ b/setuptools/tests/environment.py @@ -78,6 +78,9 @@ class ZippedEnvironment(unittest.TestCase): old_cwd = None def setUp(self): + if self.datafile is None or self.dataname is None: + return + if not os.path.isfile(self.datafile): self.old_cwd = None return @@ -98,6 +101,10 @@ class ZippedEnvironment(unittest.TestCase): os.chdir(os.path.join(self.temp_dir, self.dataname)) def tearDown(self): + #Assume setUp was never completed + if self.dataname is None or self.datafile is None: + return + try: if self.old_cwd: os.chdir(self.old_cwd) |