-
Notifications
You must be signed in to change notification settings - Fork 50
feat(tests): Add unit-serial to test TASKGRAPH_SERIAL #958
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -23,6 +23,9 @@ | |||||
| not os.environ.get("TASKGRAPH_USE_THREADS"), | ||||||
| reason="requires multithreading to be enabled", | ||||||
| ) | ||||||
| asynconly = pytest.mark.skipif( | ||||||
| os.environ.get("TASKGRAPH_SERIAL"), reason="requires TASKGRAPH_SERIAL to be 0" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(This is checking whether or not |
||||||
| ) | ||||||
|
|
||||||
|
|
||||||
| class FakePPE(ProcessPoolExecutor): | ||||||
|
|
@@ -42,6 +45,7 @@ def submit(self, kind_load_tasks, *args): | |||||
|
|
||||||
|
|
||||||
| @linuxonly | ||||||
| @asynconly | ||||||
| def test_kind_ordering_multiprocess(mocker, maketgg): | ||||||
| "When task kinds depend on each other, they are loaded in postorder" | ||||||
| mocked_ppe = mocker.patch.object(generator, "ProcessPoolExecutor", new=FakePPE) | ||||||
|
|
@@ -57,6 +61,7 @@ def test_kind_ordering_multiprocess(mocker, maketgg): | |||||
|
|
||||||
|
|
||||||
| @threadsonly | ||||||
| @asynconly | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be better to fix the |
||||||
| def test_kind_ordering_multithread(mocker, maketgg): | ||||||
| "When task kinds depend on each other, they are loaded in postorder" | ||||||
| mocked_tpe = mocker.patch.object(generator, "ThreadPoolExecutor", new=FakeTPE) | ||||||
|
|
||||||
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.
(async and multiprocess are not the same thing.)