Failing tests in test suite
ZanSara opened this issue · 3 comments
ZanSara commented
Running the test suite on master
shows two failing tests:
> python --version
Python 3.10.6
> pytest generalimport/test/
============================================== test session starts ==============================================
platform linux -- Python 3.10.6, pytest-7.3.0, pluggy-1.0.0
rootdir: /path-to-project/generalimport
plugins: custom-exit-code-0.3.0, asyncio-0.21.0
asyncio: mode=strict
collected 115 items
generalimport/test/test_generalimport.py ....F..........F.. [ 15%]
generalimport/test/test_usage/test_binary.py ........ [ 22%]
generalimport/test/test_usage/test_callable.py ....... [ 28%]
generalimport/test/test_usage/test_cast.py ....... [ 34%]
generalimport/test/test_usage/test_compare.py ...s.... [ 41%]
generalimport/test/test_usage/test_context.py .. [ 43%]
generalimport/test/test_usage/test_delete.py .. [ 45%]
generalimport/test/test_usage/test_info.py .. [ 46%]
generalimport/test/test_usage/test_iterable.py ....... [ 53%]
generalimport/test/test_usage/test_logic.py ........ [ 60%]
generalimport/test/test_usage/test_lookup.py ..s [ 62%]
generalimport/test/test_usage/test_math.py ............................... [ 89%]
generalimport/test/test_usage/test_matrix.py ... [ 92%]
generalimport/test/test_usage/test_object.py . [ 93%]
generalimport/test/test_usage/test_pickle.py . [ 93%]
generalimport/test/test_usage/test_string.py .... [ 97%]
generalimport/test/test_usage/test_thread.py ... [100%]
=================================================== FAILURES ====================================================
____________________________________________ Test.test_generalimport ____________________________________________
self = <test_generalimport.Test testMethod=test_generalimport>
def test_generalimport(self):
> self.assertEqual(True, module_name_is_namespace("namespace"))
E AssertionError: True != False
generalimport/test/test_generalimport.py:107: AssertionError
_________________________________________ Test.test_namespace_importer __________________________________________
self = <test_generalimport.Test testMethod=test_namespace_importer>
def test_namespace_importer(self):
> self.assertEqual(True, module_name_is_namespace("namespace"))
E AssertionError: True != False
generalimport/test/test_generalimport.py:97: AssertionError
============================================ short test summary info ============================================
FAILED generalimport/test/test_generalimport.py::Test::test_generalimport - AssertionError: True != False
FAILED generalimport/test/test_generalimport.py::Test::test_namespace_importer - AssertionError: True != False
=================================== 2 failed, 111 passed, 2 skipped in 0.30s ====================================
Mandera commented
ZanSara commented
Looks good! All tests seem to be passing now, so I'll close this 🙂
Mandera commented
I re-opened this because it happened again. Doesn't seem to happen in all scenarios.
It's like it gets hit by a tree shaker or something, I think I'll just create a context manager to create the fake namespace (an empty folder) in the test setup