Some tests are broken
soupytwist opened this issue · 1 comments
soupytwist commented
Latest build:
https://travis-ci.org/github/google/pasta/builds/755358468
Oddly, they pass locally. Perhaps a different minor version? Looking into it.
mcepl commented
+1 from me while packaging google-pasta for openSUSE/Factory and with Python 3.9 (only, 3.6 passes without any problem):
[ 6s] + PYTHONPATH=/home/abuild/rpmbuild/BUILDROOT/python-google-pasta-0.2.0-0.x86_64/usr/lib/python3.9/site-packages
[ 6s] + PYTHONDONTWRITEBYTECODE=1
[ 6s] + pytest-3.9 --ignore=_build.python36 --ignore=_build.python39 --ignore=_build.python38 -v
[ 6s] ============================= test session starts ==============================
[ 6s] platform linux -- Python 3.9.7, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.9
[ 6s] cachedir: .pytest_cache
[ 6s] rootdir: /home/abuild/rpmbuild/BUILD/pasta-0.2.0
[ 6s] collecting ... collected 242 items
[ 6s]
[ ... many PASSED lines deleted ...]
[ 7s]
[ 7s] =================================== FAILURES ===================================
[ 7s] ___________ PrefixSuffixGoldenTest.test_golden_prefix_suffix_fstring ___________
[ 7s]
[ 7s] self = <pasta.base.annotate_test.PrefixSuffixGoldenTest testMethod=test_golden_prefix_suffix_fstring>
[ 7s]
[ 7s] def test(self):
[ 7s] with open(input_file, 'r') as handle:
[ 7s] src = handle.read()
[ 7s] t = ast_utils.parse(src)
[ 7s] annotator = annotate.AstAnnotator(src)
[ 7s] annotator.visit(t)
[ 7s]
[ 7s] def escape(s):
[ 7s] return '' if s is None else s.replace('\n', '\\n')
[ 7s]
[ 7s] result = '\n'.join(
[ 7s] "{0:12} {1:20} \tprefix=|{2}|\tsuffix=|{3}|\tindent=|{4}|".format(
[ 7s] str((getattr(n, 'lineno', -1), getattr(n, 'col_offset', -1))),
[ 7s] type(n).__name__ + ' ' + _get_node_identifier(n),
[ 7s] escape(fmt.get(n, 'prefix')),
[ 7s] escape(fmt.get(n, 'suffix')),
[ 7s] escape(fmt.get(n, 'indent')))
[ 7s] for n in ast.walk(t)) + '\n'
[ 7s]
[ 7s] # If specified, write the golden data instead of checking it
[ 7s] if getattr(self, 'generate_goldens', False):
[ 7s] if not os.path.isdir(os.path.dirname(golden_file)):
[ 7s] os.makedirs(os.path.dirname(golden_file))
[ 7s] with open(golden_file, 'w') as f:
[ 7s] f.write(result)
[ 7s] print('Wrote: ' + golden_file)
[ 7s] return
[ 7s]
[ 7s] try:
[ 7s] with open(golden_file, 'r') as f:
[ 7s] golden = f.read()
[ 7s] except IOError:
[ 7s] self.fail('Missing golden data.')
[ 7s]
[ 7s] > self.assertMultiLineEqual(golden, result)
[ 7s] E AssertionError: '(-1,[5721 chars](21, 1) Name a \tprefix=||\[4307 chars]||\n' != '(-1,[5721 chars](21, 3) Name a \tprefix=||\[4307 chars]||\n'
[ 7s] E (-1, -1) Module prefix=|| suffix=|| indent=||
[ 7s] E (1, 0) Expr prefix=|| suffix=|\n| indent=||
[ 7s] E (3, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (5, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (7, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (9, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (11, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (13, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (15, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (17, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (21, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (23, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (25, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (27, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (29, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (31, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (33, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (36, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (38, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (42, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (45, 0) Expr prefix=|\n| suffix=|\n| indent=||
[ 7s] E (1, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (3, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (5, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (7, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (9, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (11, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (13, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (15, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (17, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (21, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (23, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (25, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (27, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (29, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (31, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (33, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (36, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (38, 0) Call prefix=|| suffix=|| indent=||
[ 7s] E (42, 1) JoinedStr prefix=|(| suffix=|)| indent=||
[ 7s] E (45, 1) JoinedStr prefix=|(| suffix=|)| indent=||
[ 7s] E (1, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (3, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (5, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (5, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (5, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (7, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (7, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (9, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (9, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (11, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (11, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (13, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (13, 0) FormattedValue prefix=| | suffix=|| indent=||
[ 7s] E (15, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (15, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (15, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (17, 0) FormattedValue prefix=|\n | suffix=|\n| indent=||
[ 7s] E (21, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (23, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (25, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (27, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (29, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (31, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (33, 0) FormattedValue prefix=|\n | suffix=|| indent=||
[ 7s] E (36, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (38, 0) Name foo prefix=|| suffix=|| indent=||
[ 7s] E (38, 4) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (42, 1) Constant prefix=|| suffix=|| indent=||
[ 7s] E (42, 1) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (42, 1) Constant prefix=|| suffix=|| indent=||
[ 7s] E (45, 1) Constant prefix=|| suffix=|| indent=||
[ 7s] E (45, 1) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (3, 3) Name b prefix=|| suffix=|| indent=||
[ 7s] E (5, 5) Name d prefix=|| suffix=|| indent=||
[ 7s] E (7, 5) Name g prefix=|| suffix=|| indent=||
[ 7s] E (9, 3) Name h prefix=|| suffix=|| indent=||
[ 7s] E (11, 9) Name k prefix=|| suffix=|| indent=||
[ 7s] E (13, 6) BinOp prefix=|| suffix=|| indent=||
[ 7s] E (15, 5) Constant prefix=|| suffix=|| indent=||
[ 7s] E (18, 2) BinOp prefix=|| suffix=|| indent=||
[ 7s] E - (21, 1) Name a prefix=|| suffix=|| indent=||
[ 7s] E ? ^
[ 7s] E + (21, 3) Name a prefix=|| suffix=|| indent=||
[ 7s] E ? ^
[ 7s] E - (23, 1) Name b prefix=|| suffix=|| indent=||
[ 7s] E ? ^
[ 7s] E + (23, 3) Name b prefix=|| suffix=|| indent=||
[ 7s] E ? ^
[ 7s] E - (25, 1) Name c prefix=|| suffix=|| indent=||
[ 7s] E ? ^
[ 7s] E + (25, 3) Name c prefix=|| suffix=|| indent=||
[ 7s] E ? ^
[ 7s] E (25, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E - (27, 1) Name c prefix=|| suffix=| | indent=||
[ 7s] E ? ^
[ 7s] E + (27, 3) Name c prefix=|| suffix=| | indent=||
[ 7s] E ? ^
[ 7s] E (27, 0) JoinedStr prefix=|| suffix=| | indent=||
[ 7s] E - (29, 1) Name f prefix=|| suffix=|| indent=||
[ 7s] E ? ^
[ 7s] E + (29, 3) Name f prefix=|| suffix=|| indent=||
[ 7s] E ? ^
[ 7s] E (29, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E - (31, 1) Name h prefix=|| suffix=| | indent=||
[ 7s] E ? ^
[ 7s] E + (31, 3) Name h prefix=|| suffix=| | indent=||
[ 7s] E ? ^
[ 7s] E (31, 0) JoinedStr prefix=|| suffix=|| indent=||
[ 7s] E (34, 2) Name l prefix=|| suffix=|| indent=||
[ 7s] E (33, 0) JoinedStr prefix=|| suffix=| | indent=||
[ 7s] E (36, 3) Attribute c prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (38, 4) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (38, 4) Constant prefix=|| suffix=|| indent=||
[ 7s] E (42, 6) Name e prefix=|| suffix=|| indent=||
[ 7s] E (46, 7) Name h prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (13, 6) Constant prefix=|| suffix=| | indent=||
[ 7s] E (-1, -1) Add prefix=|| suffix=|| indent=||
[ 7s] E (13, 10) Constant prefix=|| suffix=| | indent=||
[ 7s] E (18, 2) Constant prefix=|| suffix=| | indent=||
[ 7s] E (-1, -1) Add prefix=|| suffix=|| indent=||
[ 7s] E (18, 6) Constant prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (25, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (27, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (29, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (31, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (31, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (31, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (31, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (33, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (33, 0) FormattedValue prefix=|| suffix=|| indent=||
[ 7s] E (33, 0) Constant prefix=|| suffix=|| indent=||
[ 7s] E (36, 4) Attribute b prefix=|(| suffix=|)| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (38, 7) Name d prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (29, 6) Name g prefix=|| suffix=|| indent=||
[ 7s] E (31, 12) Name i prefix=|| suffix=|| indent=||
[ 7s] E (31, 17) Name j prefix=|| suffix=|| indent=||
[ 7s] E (34, 10) Name m prefix=|| suffix=|| indent=||
[ 7s] E (36, 4) Name a prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s] E (-1, -1) Load prefix=|| suffix=|| indent=||
[ 7s]
[ 7s] pasta/base/annotate_test.py:376: AssertionError
[ 7s] =============================== warnings summary ===============================
[ 7s] pasta/augment/inline_test.py::InlineTest::test_inline_conditional_fails
[ 7s] /home/abuild/rpmbuild/BUILD/pasta-0.2.0/pasta/augment/inline_test.py:79: DeprecationWarning: Please use assertRaisesRegex instead.
[ 7s] with self.assertRaisesRegexp(inline.InlineError,
[ 7s]
[ 7s] pasta/augment/inline_test.py::InlineTest::test_inline_function_fails
[ 7s] /home/abuild/rpmbuild/BUILD/pasta-0.2.0/pasta/augment/inline_test.py:71: DeprecationWarning: Please use assertRaisesRegex instead.
[ 7s] with self.assertRaisesRegexp(
[ 7s]
[ 7s] pasta/augment/inline_test.py::InlineTest::test_inline_non_assign_fails
[ 7s] /home/abuild/rpmbuild/BUILD/pasta-0.2.0/pasta/augment/inline_test.py:86: DeprecationWarning: Please use assertRaisesRegex instead.
[ 7s] with self.assertRaisesRegexp(
[ 7s]
[ 7s] pasta/augment/inline_test.py::InlineTest::test_inline_non_constant_fails
[ 7s] /home/abuild/rpmbuild/BUILD/pasta-0.2.0/pasta/augment/inline_test.py:63: DeprecationWarning: Please use assertRaisesRegex instead.
[ 7s] with self.assertRaisesRegexp(inline.InlineError,
[ 7s]
[ 7s] -- Docs: https://docs.pytest.org/en/stable/warnings.html
[ 7s] =========================== short test summary info ============================
[ 7s] FAILED pasta/base/annotate_test.py::PrefixSuffixGoldenTest::test_golden_prefix_suffix_fstring
[ 7s] ============ 1 failed, 218 passed, 23 skipped, 4 warnings in 0.83s =============
Build logs with all packages used and steps taken.