-
Couldn't load subscription status.
- Fork 627
Add threading CI job #4489
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
Add threading CI job #4489
Conversation
bbedf3b to
1a9c481
Compare
a0cbbb9 to
6f9249c
Compare
6f9249c to
ee1db3a
Compare
1f9506a to
8eaf762
Compare
8eaf762 to
432f7a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I'd like to have an issue to remove many of these threading skips when we can fix the
tmp_path(_factory)fixture problem. Maybe have a separate skip decorator for these? - Similarly, let's make the time-related skips more precise with an
@skipif_time_unpatched? It can be defined asskipif_time_unpatched = skipif_threading, but at call sites it's nice to know why we've skipped in that bit of extra detail.
|
Probably we should generalize crosshair's |
Which fixture problem is this? If it's just "concurrent writes to the same temp path under threading", I actually think it's better to leave tests like this skipped than to change to @skipif_threading
def test_two_directory_databases_can_interact(tmp_path):
db1 = DirectoryBasedExampleDatabase(tmp_path)
db2 = DirectoryBasedExampleDatabase(tmp_path)
db1.save(b"foo", b"bar")
assert list(db2.fetch(b"foo")) == [b"bar"]
db2.save(b"foo", b"bar")
db2.save(b"foo", b"baz")
assert sorted(db1.fetch(b"foo")) == [b"bar", b"baz"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, merge when you're happy.
This won't work until pytest-run-parallel releases
v0.6.0with support for running hypothesis tests. Hopefully that's soon: Quansight-Labs/pytest-run-parallel#96 (comment)