changeset 4998:177ccc998b04

tests: Remove imported_from_test function AFAICT, this function is not used: $ ag imported_from_test kallithea/tests/nose_parametrized.py 144:def imported_from_test():
author Marc Abramowitz <marc@marc-abramowitz.com>
date Wed, 08 Apr 2015 13:48:30 -0700
parents 9885bbacf99c
children 7b7d5029c81f
files kallithea/tests/nose_parametrized.py
diffstat 1 files changed, 0 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/nose_parametrized.py	Wed Apr 08 10:15:05 2015 -0700
+++ b/kallithea/tests/nose_parametrized.py	Wed Apr 08 13:48:30 2015 -0700
@@ -141,20 +141,6 @@
         raise AssertionError("%r in %r" % (needle, haystack))
 
 
-def imported_from_test():
-    """ Returns true if it looks like this module is being imported by unittest
-        or nose. """
-    import re
-    import inspect
-    nose_re = re.compile(r"\bnose\b")
-    unittest_re = re.compile(r"\bunittest2?\b")
-    for frame in inspect.stack():
-        file = frame[1]
-        if nose_re.search(file) or unittest_re.search(file):
-            return True
-    return False
-
-
 def assert_raises(func, exc_type, str_contains=None, repr_contains=None):
     try:
         func()