Fix a few tests by either fixing the test cases or adding py__bool__ functions to objects that should have such a method.

This commit is contained in:
Dave Halter
2014-08-20 17:28:54 +02:00
parent f911050300
commit 3cf8bfa8e1
3 changed files with 12 additions and 4 deletions

View File

@@ -92,7 +92,7 @@ class TestRegression(TestCase):
class C:
pass
variable = f or C""")
variable = f if random.choice([0, 1]) else C""")
defs = Script(source, column=3).goto_definitions()
defs = sorted(defs, key=lambda d: d.line)
self.assertEqual([d.description for d in defs],