Skip to content

Conversation

@Liam-DeVoe
Copy link
Member

@Liam-DeVoe Liam-DeVoe commented Jul 29, 2025

This won't work until pytest-run-parallel releases v0.6.0 with support for running hypothesis tests. Hopefully that's soon: Quansight-Labs/pytest-run-parallel#96 (comment)

Copy link
Member

@Zac-HD Zac-HD left a 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 as skipif_time_unpatched = skipif_threading, but at call sites it's nice to know why we've skipped in that bit of extra detail.

@Liam-DeVoe
Copy link
Member Author

Probably we should generalize crosshair's Why to share skip infrastructure among all cases (emscripten, crosshair, threading, others). We're testing enough of a variety that getting good static feedback here, in a consistent way, seems nice. (not today, though..)

@Liam-DeVoe
Copy link
Member Author

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?

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 tmp_path / threading.get_ident(). Changing this test to run under threading wouldn't test anything meaningful.

@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"]

@Liam-DeVoe Liam-DeVoe requested a review from Zac-HD August 6, 2025 20:46
Copy link
Member

@Zac-HD Zac-HD left a 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.

@Liam-DeVoe Liam-DeVoe merged commit 90f5df9 into HypothesisWorks:master Aug 7, 2025
62 checks passed
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

Successfully merging this pull request may close these issues.

2 participants