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

Remove brittle test #178

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions tests/test_dom_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

from dominate.tags import *

from dominate import dom_tag as sut

def test___get_thread_context(monkeypatch):
from dominate import dom_tag as sut
greenlet = mock.Mock()
greenlet.getcurrent.return_value = 100
monkeypatch.setattr(sut, 'greenlet', greenlet)
Expand All @@ -17,10 +17,7 @@ def test___get_thread_context(monkeypatch):
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
]
assert sut._get_thread_context() is not None

def test_add_raw_string():
container = div()
Expand Down