Jason Pellerin  committed d804f2b

Fixed issue 64: added is_generator to nose.util (alias for isgenerator)

  • Participants
  • Parent commits 208d8fb
  • Branches 0.10.0-stable

Comments (0)

Files changed (2)

File nose/

     for objects that can't be subclasses of anything.
+        # This is a little tricky -- anything that's not a class will
+        # raise a TypeError when passed to issubclass.
         issubclass(obj, type)
     except TypeError:
         return False
         return func.func_code.co_flags & CO_GENERATOR != 0
     except AttributeError:
         return False
+# backwards compat (issue #64)
+is_generator = isgenerator
 def ispackage(path):

File unit_tests/

+def test_is_generator_alias():
+    from nose.util import is_generator, isgenerator