[tor-commits] [stem/master] Skip tests requiring setUpClass() in python 2.6
atagar at torproject.org
atagar at torproject.org
Fri Jan 1 21:43:55 UTC 2016
commit c24f8ce2715fdb630969a8825b954456e10259c7
Author: Damian Johnson <atagar at torproject.org>
Date: Fri Jan 1 13:31:13 2016 -0800
Skip tests requiring setUpClass() in python 2.6
Unittest's setUpClass() function was added in python 2.7, so skipping tests
that require it when running python 2.6.
======================================================================
ERROR: test_installs_all_files
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/atagar/Desktop/stem/test/integ/installation.py", line 74, in test_installs_all_files
if self.requires_installation():
File "/home/atagar/Desktop/stem/test/integ/installation.py", line 48, in requires_installation
if self.skip_reason:
AttributeError: 'TestInstallation' object has no attribute 'skip_reason'
----------------------------------------------------------------------
Ran 2 tests in 0.002s
FAILED (errors=2)
---
test/integ/installation.py | 3 +++
test/integ/manual.py | 3 +++
2 files changed, 6 insertions(+)
diff --git a/test/integ/installation.py b/test/integ/installation.py
index 986fb3c..d068d57 100644
--- a/test/integ/installation.py
+++ b/test/integ/installation.py
@@ -13,6 +13,9 @@ BASE_DIRECTORY = os.path.sep.join(__file__.split(os.path.sep)[:-3])
class TestInstallation(unittest.TestCase):
+ # TODO: remove when dropping support for python 2.6
+ skip_reason = 'setUpClass() unsupported in python 2.6'
+
@classmethod
def setUpClass(self):
self.site_packages_path = None
diff --git a/test/integ/manual.py b/test/integ/manual.py
index 9fccb54..fc679bb 100644
--- a/test/integ/manual.py
+++ b/test/integ/manual.py
@@ -85,6 +85,9 @@ Policies are considered first to last, and the first match wins. If you want to
class TestManual(unittest.TestCase):
+ # TODO: remove when dropping support for python 2.6
+ skip_reason = 'setUpClass() unsupported in python 2.6'
+
@classmethod
def setUpClass(self):
self.man_path = None
More information about the tor-commits
mailing list