=== modified file 'test/regrtest.py' --- test/regrtest.py 2007-03-02 01:24:23 +0000 +++ test/regrtest.py 2007-03-02 01:33:52 +0000 @@ -72,6 +72,10 @@ def test_pylint_config_attr(self): + try: + from pylint import lint + except ImportError: + self.skip('pylint not available') mod = m.astng_from_module_name('pylint.lint') pylinter = mod['PyLinter'] self.assertEquals([c.name for c in pylinter.ancestors()], === modified file 'test/unittest_inference.py' --- test/unittest_inference.py 2007-03-02 01:24:23 +0000 +++ test/unittest_inference.py 2007-03-02 01:38:46 +0000 @@ -635,8 +635,14 @@ node = get_name_node(astng, 'open', -1) infered = list(node.infer()) self.failUnlessEqual(len(infered), 1) - self.assertIsInstance(infered[0], nodes.Class) - self.failUnlessEqual(infered[0].name, 'file') + if open is file: + # On python < 2.5 open and file are the same thing. + self.assertIsInstance(infered[0], nodes.Class) + self.failUnlessEqual(infered[0].name, 'file') + else: + # On python >= 2.5 open is a builtin function. + self.assertIsInstance(infered[0], nodes.Function) + self.failUnlessEqual(infered[0].name, 'open') def test_callfunc_context_inference(self): data = ''' @@ -739,7 +745,7 @@ infered = list(astng.igetattr('x')) self.failUnlessEqual(len(infered), 2) value = [str(v) for v in infered] - self.assertEquals(value, ['Instance of __main__.Yyarray', + self.assertEquals(value, ['Instance of %s.myarray' % (__name__,), 'Instance of __builtin__.int']) if __name__ == '__main__':