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/test_sdist.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/test_sdist.py')
-rw-r--r-- | setuptools/tests/test_sdist.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index b42dcc57..71d10757 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -9,7 +9,8 @@ import tempfile import unittest import unicodedata import re -from setuptools.tests import environment +from setuptools.tests import environment, test_svn +from setuptools.tests.py26compat import skipIf from setuptools.compat import StringIO, unicode from setuptools.tests.py26compat import skipIf @@ -473,6 +474,9 @@ class TestSvn(environment.ZippedEnvironment): def setUp(self): version = svn_utils.SvnInfo.get_svn_version() + if not version: # None or Empty + return + self.base_version = tuple([int(x) for x in version.split('.')][:2]) if not self.base_version: @@ -488,6 +492,7 @@ class TestSvn(environment.ZippedEnvironment): 'svn_data', self.dataname + ".zip") super(TestSvn, self).setUp() + @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") def test_walksvn(self): if self.base_version >= (1, 6): folder2 = 'third party2' |