Commits

Marcin Kasperski committed 3d1b520

Skipped tests work properly under both trial and nose

Comments (0)

Files changed (1)

tests/test_parser.py

 from mekk.fics import errors
 import datetime
 from decimal import Decimal
-from nose import SkipTest
+
+# Proper SkipTest depends on whether we run under trial, or under nose. Let's hack it
+import sys
+from nose import SkipTest as NoseSkipTest
+from twisted.trial.unittest import SkipTest as TrialSkipTest
+if sys.argv[0].endswith("trial"):
+    SkipTest = TrialSkipTest
+else:
+    SkipTest = NoseSkipTest
 
 FICS_PARSE_DATA_DIR = "ficsparserdata"