test_is_literal_or_name fails with Python 3.10
mcepl opened this issue · comments
Matěj Cepl commented
While packaging autoflake for openSUSE I have test_is_literal_or_name failing with 3.10 (3.8 and 3.9 passes complete test suite):
[ 9s] + pytest-3.10 --ignore=_build.python39 --ignore=_build.python310 --ignore=_build.python38 -v
[ 10s] ============================= test session starts ==============================
[ 10s] platform linux -- Python 3.10.2, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /usr/bin/python3.10
...
[ 11s] =================================== FAILURES ===================================
[ 11s] ______________________ UnitTests.test_is_literal_or_name _______________________
[ 11s]
[ 11s] self = <test_autoflake.UnitTests testMethod=test_is_literal_or_name>
[ 11s]
[ 11s] def test_is_literal_or_name(self):
[ 11s] self.assertTrue(autoflake.is_literal_or_name('123'))
[ 11s] self.assertTrue(autoflake.is_literal_or_name('[1, 2, 3]'))
[ 11s] self.assertTrue(autoflake.is_literal_or_name('xyz'))
[ 11s]
[ 11s] self.assertFalse(autoflake.is_literal_or_name('xyz.prop'))
[ 11s] self.assertFalse(autoflake.is_literal_or_name(' '))
[ 11s] > self.assertFalse(autoflake.is_literal_or_name(' 1'))
[ 11s] E AssertionError: True is not false
[ 11s]
[ 11s] test_autoflake.py:1203: AssertionError
Complete build log with all packages used and tests run.
fsouza commented
This is fixed now.
Matěj Cepl commented
This is fixed now.
In which commit? What patch I should add to our build to make the test pass? Is it just e9e0825 ?