fix issue33 - no collection error for classes prefixed "test" deriving from object

This commit is contained in:
holger krekel
2011-03-16 16:36:18 +01:00
parent a9f1f26a39
commit ed6d2537bc
5 changed files with 20 additions and 13 deletions

View File

@@ -46,6 +46,16 @@ class TestClass:
l = modcol.collect()
assert len(l) == 0
def test_class_subclassobject(self, testdir):
testdir.getmodulecol("""
class test(object):
pass
""")
result = testdir.runpytest()
result.stdout.fnmatch_lines([
"*collected 0*",
])
class TestGenerator:
def test_generative_functions(self, testdir):
modcol = testdir.getmodulecol("""