fix unorderable types as reported by Ralf Schmitt

This commit is contained in:
holger krekel
2011-12-14 10:56:51 +00:00
parent 94e31e414a
commit 82ba764bb6
7 changed files with 49 additions and 7 deletions

View File

@@ -1517,3 +1517,20 @@ def test_customize_through_attributes(testdir):
"*MyInstance*",
"*MyFunction*test_hello*",
])
def test_unorderable_types(testdir):
testdir.makepyfile("""
class TestJoinEmpty:
pass
def make_test():
class Test:
pass
Test.__name__ = "TestFoo"
return Test
TestFoo = make_test()
""")
result = testdir.runpytest()
assert "TypeError" not in result.stdout.str()
assert result.ret == 0