diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2019-06-02 13:54:17 +0200 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-06-02 13:54:17 +0200 |
| commit | 0a0c5c91e2e516869b7014ab3be72285e04ee688 (patch) | |
| tree | c227cf0aa6d0bf9d1348428b02b31e357dc37228 | |
| parent | 42c21d6088add3b6fe1920cc9f3072afb9e7217c (diff) | |
| download | astroid-git-0a0c5c91e2e516869b7014ab3be72285e04ee688.tar.gz | |
Adjust a line number test for Python 3.8
| -rw-r--r-- | astroid/tests/unittest_builder.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/astroid/tests/unittest_builder.py b/astroid/tests/unittest_builder.py index d02b581f..bd94ee80 100644 --- a/astroid/tests/unittest_builder.py +++ b/astroid/tests/unittest_builder.py @@ -31,6 +31,7 @@ from astroid.tests import resources MANAGER = manager.AstroidManager() BUILTINS = builtins.__name__ +PY38 = sys.version_info[:2] >= (3, 8) class FromToLineNoTest(unittest.TestCase): @@ -59,7 +60,7 @@ class FromToLineNoTest(unittest.TestCase): if hasattr(sys, "pypy_version_info"): lineno = 4 else: - lineno = 5 # no way for this one in CPython (is 4 actually) + lineno = 5 if not PY38 else 4 self.assertEqual(strarg.fromlineno, lineno) self.assertEqual(strarg.tolineno, lineno) namearg = callfunc.args[1] @@ -127,13 +128,6 @@ class FromToLineNoTest(unittest.TestCase): self.assertEqual(function.tolineno, 5) self.assertEqual(function.decorators.fromlineno, 2) self.assertEqual(function.decorators.tolineno, 2) - if sys.version_info < (3, 0): - self.assertEqual(function.blockstart_tolineno, 4) - else: - self.skipTest( - "FIXME http://bugs.python.org/issue10445 " - "(no line number on function args)" - ) def test_class_lineno(self): stmts = self.astroid.body |
