diff options
author | Torsten Marek <shlomme@gmail.com> | 2014-11-21 22:48:07 +0100 |
---|---|---|
committer | Torsten Marek <shlomme@gmail.com> | 2014-11-21 22:48:07 +0100 |
commit | 5d1c57abd0a16bd9a418145cc430bd622bef5ea8 (patch) | |
tree | 52d94c7571be58ed95f57324cf4adf6c0a1a009d | |
parent | c5c700dc3a4d94603d2ecb6e1168266e5931dfb1 (diff) | |
download | astroid-5d1c57abd0a16bd9a418145cc430bd622bef5ea8.tar.gz |
Added a changelog entry for a 1.3.1 bugfix release and a simple test for all module extenders.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | astroid/tests/unittest_brain.py | 16 |
2 files changed, 18 insertions, 3 deletions
@@ -1,6 +1,11 @@ Change log for the astroid package (used to be astng) ===================================================== +2014-11-21 -- 1.3.1 + + * Fixed a crash issue with the pytest brain module. + + 2014-11-20 -- 1.3.0 * Fix a maximum recursion error occured during the inference, diff --git a/astroid/tests/unittest_brain.py b/astroid/tests/unittest_brain.py index 8fa853c..0cb40a3 100644 --- a/astroid/tests/unittest_brain.py +++ b/astroid/tests/unittest_brain.py @@ -21,10 +21,12 @@ import unittest from astroid import MANAGER from astroid import bases +from astroid import nodes from astroid import test_utils import astroid -class HashlibTC(unittest.TestCase): + +class HashlibTest(unittest.TestCase): def test_hashlib(self): """Tests that brain extensions for hashlib work.""" hashlib_module = MANAGER.ast_from_module_name('hashlib') @@ -78,9 +80,9 @@ class NamedTupleTest(unittest.TestCase): self.assertIs(bases.YES, next(klass.infer())) + @unittest.skipIf(sys.version_info[0] > 2, + 'namedtuple inference is broken on Python 3') def test_namedtuple_advanced_inference(self): - if sys.version_info[0] > 2: - self.skipTest('Currently broken for Python 3.') # urlparse return an object of class ParseResult, which has a # namedtuple call and a mixin as base classes result = test_utils.extract_node(""" @@ -95,5 +97,13 @@ class NamedTupleTest(unittest.TestCase): instance.getattr('foo') +class ModuleExtenderTest(unittest.TestCase): + def testExtensionModules(self): + for extender, _ in MANAGER.transforms[nodes.Module]: + n = nodes.Module('__main__', None) + extender(n) + + + if __name__ == '__main__': unittest.main() |