Skip to content

Astroid 2.2 and Python 3.8 test failures #28

Closed
@hroncok

Description

@hroncok

The test suite fails with Python 3.8.0a3:

On c8697dc with:

diff --git a/tox.ini b/tox.ini
index b320505..30652a5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,7 +4,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py{27,35,36,37}
+envlist = py{27,35,36,37,38}
 
 [testenv]
 commands = nosetests
@@ -13,4 +13,4 @@ deps =
     coverage
     py{27}: astroid
     py{35,36}: astroid<2
-    py{37}: astroid>=2.dev
+    py{37,38}: astroid>=2.dev
$ tox -e py38
GLOB sdist-make: .../asttokens/setup.py
py38 inst-nodeps: .../asttokens/.tox/.tmp/package/1/asttokens-1.1.13.zip
py38 installed: astroid==2.2.5,asttokens==1.1.13,coverage==4.5.3,lazy-object-proxy==1.3.1,nose==1.3.7,six==1.12.0,typed-ast==1.3.1,wrapt==1.11.1
py38 run-test-pre: PYTHONHASHSEED='707348335'
py38 runtests: commands[0] | nosetests
..E...S..E.FF..F.FEEE....E.EEE.....F.......FEEFFFF.E........EEE.FFEE.EEEF....F.
======================================================================
ERROR: test_calling_lambdas (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 353, in test_calling_lambdas
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 385, in visit_call
    newnode.postinit(self.visit(node.func, newnode), args, keywords)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 699, in visit_lambda
    newnode.postinit(self.visit(node.args, newnode), self.visit(node.body, newnode))
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Add'>

======================================================================
ERROR: test_fixture10 (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 147, in test_fixture10
    def test_fixture10(self): self.verify_fixture_file('astroid/noendingnewline.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 652, in visit_if
    self.visit(node.test, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 438, in visit_compare
    [
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 439, in <listcomp>
    (self._cmp_op_classes[op.__class__], self.visit(expr, newnode))
KeyError: <class '_ast.Eq'>

======================================================================
ERROR: test_fixture7 (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 144, in test_fixture7
    def test_fixture7(self): self.verify_fixture_file('astroid/format.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 716, in visit_listcomp
    [self.visit(child, newnode) for child in node.generators],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 716, in <listcomp>
    [self.visit(child, newnode) for child in node.generators],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 451, in visit_comprehension
    [self.visit(child, newnode) for child in node.ifs],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 451, in <listcomp>
    [self.visit(child, newnode) for child in node.ifs],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Mod'>

======================================================================
ERROR: test_fixture8 (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 145, in test_fixture8
    def test_fixture8(self): self.verify_fixture_file('astroid/module.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 1031, in visit_classdef
    return super(TreeRebuilder3, self).visit_classdef(
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 404, in visit_classdef
    [self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 404, in <listcomp>
    [self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 607, in visit_functiondef
    return self._visit_functiondef(nodes.FunctionDef, node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in _visit_functiondef
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in <listcomp>
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 982, in visit_try
    body = [self.visit(child, newnode) for child in node.body]
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 982, in <listcomp>
    body = [self.visit(child, newnode) for child in node.body]
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 652, in visit_if
    self.visit(node.test, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 438, in visit_compare
    [
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 439, in <listcomp>
    (self._cmp_op_classes[op.__class__], self.visit(expr, newnode))
KeyError: <class '_ast.In'>

======================================================================
ERROR: test_fixture9 (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 146, in test_fixture9
    def test_fixture9(self): self.verify_fixture_file('astroid/module2.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.BitOr'>

======================================================================
ERROR: test_nonascii (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 264, in test_nonascii
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Add'>

======================================================================
ERROR: test_parens_around_func (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 515, in test_parens_around_func
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 385, in visit_call
    newnode.postinit(self.visit(node.func, newnode), args, keywords)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 342, in visit_boolop
    self._bool_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Or'>

======================================================================
ERROR: test_print_function (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 250, in test_print_function
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 986, in visit_try
    return self.visit_tryexcept(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 847, in visit_tryexcept
    [self.visit(child, newnode) for child in node.handlers],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 847, in <listcomp>
    [self.visit(child, newnode) for child in node.handlers],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 942, in visit_excepthandler
    [self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 942, in <listcomp>
    [self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 607, in visit_functiondef
    return self._visit_functiondef(nodes.FunctionDef, node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in _visit_functiondef
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in <listcomp>
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 560, in visit_for
    return self._visit_for(nodes.For, node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 553, in _visit_for
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 553, in <listcomp>
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 313, in visit_augassign
    self._bin_op_classes[type(node.op)] + "=",
KeyError: <class '_ast.Add'>

======================================================================
ERROR: test_return_annotation (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 403, in test_return_annotation
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 607, in visit_functiondef
    return self._visit_functiondef(nodes.FunctionDef, node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in _visit_functiondef
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in <listcomp>
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 803, in visit_return
    newnode.postinit(self.visit(node.value, newnode))
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Add'>

======================================================================
ERROR: test_calling_lambdas (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 353, in test_calling_lambdas
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 385, in visit_call
    newnode.postinit(self.visit(node.func, newnode), args, keywords)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 699, in visit_lambda
    newnode.postinit(self.visit(node.args, newnode), self.visit(node.body, newnode))
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Add'>

======================================================================
ERROR: test_comprehensions (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 369, in test_comprehensions
    m = self.create_mark_checker(source)
  File ".../asttokens/tests/test_mark_tokens.py", line 21, in create_mark_checker
    return tools.MarkChecker(source, parse=True)
  File ".../asttokens/tests/tools.py", line 82, in __init__
    self.atok = asttokens.ASTTokens(source, parse=parse, tree=tree)
  File ".../asttokens/asttokens/asttokens.py", line 65, in __init__
    self.mark_tokens(self._tree)
  File ".../asttokens/asttokens/asttokens.py", line 76, in mark_tokens
    MarkTokens(self).visit_tree(root_node)
  File ".../asttokens/asttokens/mark_tokens.py", line 47, in visit_tree
    util.visit_tree(node, self._visit_before_children, self._visit_after_children)
  File ".../asttokens/asttokens/util.py", line 184, in visit_tree
    ret = postvisit(current, par_value, value)
  File ".../asttokens/asttokens/mark_tokens.py", line 90, in _visit_after_children
    nfirst, nlast = self._methods.get(self, node.__class__)(node, first, last)
  File ".../asttokens/asttokens/mark_tokens.py", line 175, in visit_listcomp
    return self.handle_comp('[', node, first_token, last_token)
  File ".../asttokens/asttokens/mark_tokens.py", line 171, in handle_comp
    util.expect_token(before, token.OP, open_brace)
  File ".../asttokens/asttokens/util.py", line 56, in expect_token
    raise ValueError("Expected token %s, got %s on line %s col %s" % (
ValueError: Expected token OP:'[', got ENDMARKER:'' on line 2 col 1

======================================================================
ERROR: test_fixture10 (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 147, in test_fixture10
    def test_fixture10(self): self.verify_fixture_file('astroid/noendingnewline.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 652, in visit_if
    self.visit(node.test, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 438, in visit_compare
    [
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 439, in <listcomp>
    (self._cmp_op_classes[op.__class__], self.visit(expr, newnode))
KeyError: <class '_ast.Eq'>

======================================================================
ERROR: test_fixture7 (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 144, in test_fixture7
    def test_fixture7(self): self.verify_fixture_file('astroid/format.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 107, in verify_fixture_file
    m = self.create_mark_checker(source)
  File ".../asttokens/tests/test_mark_tokens.py", line 21, in create_mark_checker
    return tools.MarkChecker(source, parse=True)
  File ".../asttokens/tests/tools.py", line 82, in __init__
    self.atok = asttokens.ASTTokens(source, parse=parse, tree=tree)
  File ".../asttokens/asttokens/asttokens.py", line 65, in __init__
    self.mark_tokens(self._tree)
  File ".../asttokens/asttokens/asttokens.py", line 76, in mark_tokens
    MarkTokens(self).visit_tree(root_node)
  File ".../asttokens/asttokens/mark_tokens.py", line 47, in visit_tree
    util.visit_tree(node, self._visit_before_children, self._visit_after_children)
  File ".../asttokens/asttokens/util.py", line 184, in visit_tree
    ret = postvisit(current, par_value, value)
  File ".../asttokens/asttokens/mark_tokens.py", line 90, in _visit_after_children
    nfirst, nlast = self._methods.get(self, node.__class__)(node, first, last)
  File ".../asttokens/asttokens/mark_tokens.py", line 175, in visit_listcomp
    return self.handle_comp('[', node, first_token, last_token)
  File ".../asttokens/asttokens/mark_tokens.py", line 171, in handle_comp
    util.expect_token(before, token.OP, open_brace)
  File ".../asttokens/asttokens/util.py", line 56, in expect_token
    raise ValueError("Expected token %s, got %s on line %s col %s" % (
ValueError: Expected token OP:'[', got OP:'=' on line 7 col 3

======================================================================
ERROR: test_fixture8 (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 145, in test_fixture8
    def test_fixture8(self): self.verify_fixture_file('astroid/module.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 107, in verify_fixture_file
    m = self.create_mark_checker(source)
  File ".../asttokens/tests/test_mark_tokens.py", line 21, in create_mark_checker
    return tools.MarkChecker(source, parse=True)
  File ".../asttokens/tests/tools.py", line 82, in __init__
    self.atok = asttokens.ASTTokens(source, parse=parse, tree=tree)
  File ".../asttokens/asttokens/asttokens.py", line 65, in __init__
    self.mark_tokens(self._tree)
  File ".../asttokens/asttokens/asttokens.py", line 76, in mark_tokens
    MarkTokens(self).visit_tree(root_node)
  File ".../asttokens/asttokens/mark_tokens.py", line 47, in visit_tree
    util.visit_tree(node, self._visit_before_children, self._visit_after_children)
  File ".../asttokens/asttokens/util.py", line 184, in visit_tree
    ret = postvisit(current, par_value, value)
  File ".../asttokens/asttokens/mark_tokens.py", line 90, in _visit_after_children
    nfirst, nlast = self._methods.get(self, node.__class__)(node, first, last)
  File ".../asttokens/asttokens/mark_tokens.py", line 175, in visit_listcomp
    return self.handle_comp('[', node, first_token, last_token)
  File ".../asttokens/asttokens/mark_tokens.py", line 171, in handle_comp
    util.expect_token(before, token.OP, open_brace)
  File ".../asttokens/asttokens/util.py", line 56, in expect_token
    raise ValueError("Expected token %s, got %s on line %s col %s" % (
ValueError: Expected token OP:'[', got OP:'=' on line 53 col 19

======================================================================
ERROR: test_fixture9 (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 146, in test_fixture9
    def test_fixture9(self): self.verify_fixture_file('astroid/module2.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.BitOr'>

======================================================================
ERROR: test_mark_tokens_simple (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 47, in test_mark_tokens_simple
    m = self.create_mark_checker(source)
  File ".../asttokens/tests/test_mark_tokens.py", line 21, in create_mark_checker
    return tools.MarkChecker(source, parse=True)
  File ".../asttokens/tests/tools.py", line 82, in __init__
    self.atok = asttokens.ASTTokens(source, parse=parse, tree=tree)
  File ".../asttokens/asttokens/asttokens.py", line 65, in __init__
    self.mark_tokens(self._tree)
  File ".../asttokens/asttokens/asttokens.py", line 76, in mark_tokens
    MarkTokens(self).visit_tree(root_node)
  File ".../asttokens/asttokens/mark_tokens.py", line 47, in visit_tree
    util.visit_tree(node, self._visit_before_children, self._visit_after_children)
  File ".../asttokens/asttokens/util.py", line 184, in visit_tree
    ret = postvisit(current, par_value, value)
  File ".../asttokens/asttokens/mark_tokens.py", line 90, in _visit_after_children
    nfirst, nlast = self._methods.get(self, node.__class__)(node, first, last)
  File ".../asttokens/asttokens/mark_tokens.py", line 175, in visit_listcomp
    return self.handle_comp('[', node, first_token, last_token)
  File ".../asttokens/asttokens/mark_tokens.py", line 171, in handle_comp
    util.expect_token(before, token.OP, open_brace)
  File ".../asttokens/asttokens/util.py", line 56, in expect_token
    raise ValueError("Expected token %s, got %s on line %s col %s" % (
ValueError: Expected token OP:'[', got OP:'=' on line 53 col 19

======================================================================
ERROR: test_nonascii (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 264, in test_nonascii
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Add'>

======================================================================
ERROR: test_parens_around_func (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 515, in test_parens_around_func
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 294, in visit_assign
    value=self.visit(node.value, newnode),
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 385, in visit_call
    newnode.postinit(self.visit(node.func, newnode), args, keywords)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 342, in visit_boolop
    self._bool_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Or'>

======================================================================
ERROR: test_print_function (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 250, in test_print_function
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 986, in visit_try
    return self.visit_tryexcept(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 847, in visit_tryexcept
    [self.visit(child, newnode) for child in node.handlers],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 847, in <listcomp>
    [self.visit(child, newnode) for child in node.handlers],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 942, in visit_excepthandler
    [self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 942, in <listcomp>
    [self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 607, in visit_functiondef
    return self._visit_functiondef(nodes.FunctionDef, node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in _visit_functiondef
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in <listcomp>
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 560, in visit_for
    return self._visit_for(nodes.For, node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 553, in _visit_for
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 553, in <listcomp>
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 313, in visit_augassign
    self._bin_op_classes[type(node.op)] + "=",
KeyError: <class '_ast.Add'>

======================================================================
ERROR: test_return_annotation (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 403, in test_return_annotation
    m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 129, in verify_all_nodes
    left = to_source(rebuilt_node)
  File ".../asttokens/tests/tools.py", line 59, in to_source
    anode = builder.visit_module(node_copy, '', '', '')
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in visit_module
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 158, in <listcomp>
    newnode.postinit([self.visit(child, newnode) for child in node.body])
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 607, in visit_functiondef
    return self._visit_functiondef(nodes.FunctionDef, node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in _visit_functiondef
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 597, in <listcomp>
    body=[self.visit(child, newnode) for child in node.body],
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 803, in visit_return
    newnode.postinit(self.visit(node.value, newnode))
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 170, in visit
    return visit_method(node, parent)
  File ".../asttokens/.tox/py38/lib/python3.8/site-packages/astroid/rebuilder.py", line 332, in visit_binop
    self._bin_op_classes[type(node.op)], node.lineno, node.col_offset, parent
KeyError: <class '_ast.Add'>

======================================================================
FAIL: test_fixture12 (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 149, in test_fixture12
    def test_fixture12(self): self.verify_fixture_file('astroid/recursion.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 131, in verify_all_nodes
    test_case.assertEqual(left, right)
AssertionError: "' For issue #25 '\n\n\nclass Base(object):\n    pass\n\n\n" != '""" For issue #25 """\n\n\n\nclass Base(object):\n    pass\n\n\n'
- ' For issue #25 '
? ^               ^
+ """ For issue #25 """
? ^^^               ^^^
+ 
  
  
  class Base(object):
      pass
  
  


======================================================================
FAIL: test_fixture13 (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 150, in test_fixture13
    def test_fixture13(self): self.verify_fixture_file('astroid/suppliermodule_test.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 131, in verify_all_nodes
    test_case.assertEqual(left, right)
AssertionError: "' file suppliermodule.py '\n\n\nclass No[229 chars]\n\n" != '""" file suppliermodule.py """\n\n\n\ncl[235 chars]\n\n'
- ' file suppliermodule.py '
? ^                        ^
+ """ file suppliermodule.py """
? ^^^                        ^^^
+ 
  
  
  class NotImplemented(Exception):
      pass
  
  
  
  class Interface:
      
      def get_value(self):
          raise NotImplemented()
      
      def set_value(self, value):
          raise NotImplemented()
  
  
  
  class DoNothing:
      pass
  
  


======================================================================
FAIL: test_fixture4 (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 141, in test_fixture4
    def test_fixture4(self): self.verify_fixture_file('astroid/clientmodule_test.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 131, in verify_all_nodes
    test_case.assertEqual(left, right)
AssertionError: '\' docstring for file clientmodule.py \'\[819 chars]\n\n' != '""" docstring for file clientmodule.py ""[827 chars]\n\n'
Diff is 1219 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_fixture6 (tests.test_astroid.TestAstroid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 143, in test_fixture6
    def test_fixture6(self): self.verify_fixture_file('astroid/email.py')
  File ".../asttokens/tests/test_mark_tokens.py", line 108, in verify_fixture_file
    tested_nodes = m.verify_all_nodes(self)
  File ".../asttokens/tests/tools.py", line 131, in verify_all_nodes
    test_case.assertEqual(left, right)
AssertionError: '"fake email module to test absolute import doesn\'t grab this one"\n\n' != '"""fake email module to test absolute import doesn\'t grab this one"""\n\n\n\n'
- "fake email module to test absolute import doesn't grab this one"
+ """fake email module to test absolute import doesn't grab this one"""
? ++                                                                 ++
  
+ 
+ 


======================================================================
FAIL: test_to_source (tests.test_asttokens.TestASTTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_asttokens.py", line 91, in test_to_source
    self.assertEqual(tools.to_source(root).strip(), source)
AssertionError: "def foo():\n    'xxx'\n    None" != 'def foo():\n    """xxx"""\n    None'
  def foo():
-     'xxx'
+     """xxx"""
      None

======================================================================
FAIL: test_adjacent_strings (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 229, in test_adjacent_strings
    self.assertEqual(m.view_nodes_at(2, 6), {
AssertionError: Items in the first set but not the second:
"Constant:'x y z'"
Items in the second set but not the first:
'Str:\'x y z\' \\\n\'\'\'a b c\'\'\' "u v w"'

======================================================================
FAIL: test_conditional_expr (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 342, in test_conditional_expr
    self.assertEqual(m.view_nodes_at(1, 4),
AssertionError: Items in the first set but not the second:
'Constant:True'
Items in the second set but not the first:
'NameConstant:True'

======================================================================
FAIL: test_decorators (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 449, in test_decorators
    self.assertIn('FunctionDef:@deco1\ndef f():\n  pass', m.view_nodes_at(2, 0))
AssertionError: 'FunctionDef:@deco1\ndef f():\n  pass' not found in set()

======================================================================
FAIL: test_deep_recursion (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 183, in test_deep_recursion
    self.assertEqual(m.view_node(m.all_nodes[-1]),
AssertionError: "Constant:'F1akOFFiRIgPHTZksKBAgMCLGTdGNIAAQgKfDAcgZbj0odOnUA8GBAA7'" != "Str:'F1akOFFiRIgPHTZksKBAgMCLGTdGNIAAQgKfDAcgZbj0odOnUA8GBAA7'"
- Constant:'F1akOFFiRIgPHTZksKBAgMCLGTdGNIAAQgKfDAcgZbj0odOnUA8GBAA7'
? ^^^^ ^^^
+ Str:'F1akOFFiRIgPHTZksKBAgMCLGTdGNIAAQgKfDAcgZbj0odOnUA8GBAA7'
? ^ ^


======================================================================
FAIL: test_del_dict (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 391, in test_del_dict
    self.assertEqual(m.view_nodes_at(1, 5), {'Num:4'})
AssertionError: Items in the first set but not the second:
'Constant:4'
Items in the second set but not the first:
'Num:4'

======================================================================
FAIL: test_keyword_arg_only (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 431, in test_keyword_arg_only
    self.assertEqual(m.view_nodes_at(1, 4), {'Num:1'})
AssertionError: Items in the first set but not the second:
'Constant:1'
Items in the second set but not the first:
'Num:1'

======================================================================
FAIL: test_mark_tokens_multiline (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 95, in test_mark_tokens_multiline
    self.assertEqual(all_text, {
AssertionError: Items in the second set but not the first:
'a,      # line2\nb +     # line3\n  c +   # line4\n  d'

======================================================================
FAIL: test_slices (tests.test_mark_tokens.TestMarkTokens)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_mark_tokens.py", line 205, in test_slices
    self.assertEqual(m.view_nodes_at(1, 1),
AssertionError: Items in the second set but not the first:
'Tuple:foo.Area_Code, str(foo.Phone)[:3], str(foo.Phone)[3:], foo[:], bar[::, :]'

======================================================================
FAIL: test_walk_ast (tests.test_util.TestUtil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../asttokens/tests/test_util.py", line 43, in test_walk_ast
    self.assertEqual(scan, [
AssertionError: Lists differ: ["Mod[202 chars]2', 'Constant:1', 'Constant:2', "BinOp:'hello'[95 chars]ld'"] != ["Mod[202 chars]2', 'Num:1', 'Num:2', "BinOp:'hello' + ', ' + [70 chars]ld'"]

First differing element 7:
'Constant:1'
'Num:1'

  ["Module:foo(bar(1 + 2), 'hello' + ', ' + 'world')",
   "Expr:foo(bar(1 + 2), 'hello' + ', ' + 'world')",
   "Call:foo(bar(1 + 2), 'hello' + ', ' + 'world')",
   'Name:foo',
   'Call:bar(1 + 2)',
   'Name:bar',
   'BinOp:1 + 2',
-  'Constant:1',
-  'Constant:2',
+  'Num:1',
+  'Num:2',
   "BinOp:'hello' + ', ' + 'world'",
   "BinOp:'hello' + ', '",
-  "Constant:'hello'",
-  "Constant:', '",
-  "Constant:'world'"]
+  "Str:'hello'",
+  "Str:', '",
+  "Str:'world'"]

----------------------------------------------------------------------
Ran 79 tests in 0.833s

FAILED (SKIP=1, errors=20, failures=14)
ERROR: InvocationError for command '.../asttokens/.tox/py38/bin/nosetests' (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py38: commands failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions