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

tests/test_dom_tag.py:20: AssertionError while building for i686 #175

Closed
benalb opened this issue May 23, 2023 · 4 comments
Closed

tests/test_dom_tag.py:20: AssertionError while building for i686 #175

benalb opened this issue May 23, 2023 · 4 comments

Comments

@benalb
Copy link

benalb commented May 23, 2023

Trying to build void-linux package for i686, fails in test_dom_tag.py:

 =================================== FAILURES ================================
__________________________ test___get_thread_context ___________________________

 monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xf63bec30>

def test___get_thread_context(monkeypatch):
    greenlet = mock.Mock()
    greenlet.getcurrent.return_value = 100
    monkeypatch.setattr(sut, 'greenlet', greenlet)

    threading = mock.Mock()
    threading.current_thread.return_value = 200
    monkeypatch.setattr(sut, 'threading', threading)

  assert sut._get_thread_context() in [
        -6805948436281256182, # Python >= 3.9
        3713141171098444831, # Python < 3.9
    ]
E       assert 1692341442 in [-6805948436281256182, 3713141171098her444831]
E        +  where 1692341442 = <function _get_thread_context at 0xf6894938>()
E        +    where <function _get_thread_context at 0xf6894938> = sut._get_thread_context

tests/test_dom_tag.py:20: AssertionError
=========================== short test summary info ============================
 FAILED tests/test_dom_tag.py::test___get_thread_context - assert 1692341442 i...

full log: here

@Knio
Copy link
Owner

Knio commented May 23, 2023

Looks like you can just add 1692341442 to the set of ids... this is a very brittle test :(

@benalb
Copy link
Author

benalb commented May 25, 2023

Looks like you can just add 1692341442 to the set of ids... this is a very brittle test :(

That fixes the build un i686. Do you want me to make a PR with the change?

@Knio
Copy link
Owner

Knio commented May 26, 2023

sure yeah, or if you have any ideas how to refactor this test

@benalb
Copy link
Author

benalb commented May 26, 2023

sure yeah, or if you have any ideas how to refactor this test

Sorry, no clue about that, will push the PR this weekend. I'm closing the issue. Thank you.

@benalb benalb closed this as completed May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants