diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2016-11-21 11:22:43 +0200 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2016-12-30 13:00:33 +0200 |
| commit | 54a7cc708998cd27371f138ac0a335d28bfb02a4 (patch) | |
| tree | 201fb903d7fc0b92fbcd831f1b733121d0a00622 /astroid | |
| parent | 9b75d6fb5255abe49305a62b346fb11ebfcbf956 (diff) | |
| download | astroid-git-54a7cc708998cd27371f138ac0a335d28bfb02a4.tar.gz | |
Hardcode the names of the expected unbound method names.
Diffstat (limited to 'astroid')
| -rw-r--r-- | astroid/tests/unittest_object_model.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/astroid/tests/unittest_object_model.py b/astroid/tests/unittest_object_model.py index 573ebbba..141354f7 100644 --- a/astroid/tests/unittest_object_model.py +++ b/astroid/tests/unittest_object_model.py @@ -106,8 +106,12 @@ class UnboundMethodModelTest(unittest.TestCase): cls = next(ast_nodes[0].infer()) self.assertIsInstance(cls, astroid.ClassDef) - unbound = BUILTINS.locals[types.MethodType.__name__][0] - self.assertIs(cls, unbound) + if six.PY2: + unbound_name = 'instancemethod' + else: + unbound_name = 'function' + + self.assertEqual(cls.name, unbound_name) func = next(ast_nodes[1].infer()) self.assertIsInstance(func, astroid.FunctionDef) |
