Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing tests in test suite #20

Open
ZanSara opened this issue Apr 13, 2023 · 3 comments
Open

Failing tests in test suite #20

ZanSara opened this issue Apr 13, 2023 · 3 comments
Milestone

Comments

@ZanSara
Copy link
Contributor

ZanSara commented Apr 13, 2023

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
Copy link
Contributor

Mandera commented Apr 16, 2023

These tests are relying on the almost empty folder namespace, is it possible this got lost somewhere?
Could make that folder created by the test setup instead

See reasoning behind whole namespace thing here

@ZanSara
Copy link
Contributor Author

ZanSara commented Apr 18, 2023

Looks good! All tests seem to be passing now, so I'll close this 🙂

@ZanSara ZanSara closed this as completed Apr 18, 2023
@Mandera Mandera reopened this May 9, 2023
@Mandera Mandera moved this to 🟡 In Progress in All Issues May 9, 2023
@Mandera Mandera added this to the Contributing milestone May 9, 2023
@Mandera
Copy link
Contributor

Mandera commented May 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🟡 In Progress
Development

No branches or pull requests

2 participants