From d16da33b9bece8fb08e6e289b8ce386bfcff2c48 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 23 Apr 2015 04:11:28 +0200 Subject: [PATCH] Small test fix. --- test/test_api/test_classes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_api/test_classes.py b/test/test_api/test_classes.py index 206e2f0b..59ce2837 100644 --- a/test/test_api/test_classes.py +++ b/test/test_api/test_classes.py @@ -314,8 +314,10 @@ class TestGotoAssignments(TestCase): assert n.name == 'os' assert n.type == 'module' n = nms[1].goto_assignments()[0] - assert n.name == 'path' - assert n.type == 'import' + # This is very special, normally the name doesn't chance, but since + # os.path is a sys.modules hack, it does. + assert n.name in ('ntpath', 'posixpath') + assert n.type == 'module' def test_import_alias(self): nms = names('import json as foo', references=True)