-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: prepare parallelization of end to end tests (#1382)
Time spent on this PR: 0.2 ## Pull request type Please check the type of change your PR introduces: - [ ] Bugfix - [x] Feature - [ ] Code style update (formatting, renaming) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? It's not possible to use pytest-xdist with end to end tests. ## What is the new behavior? Some of the nonce issues have been solved. Katana still drops transaction with no obvious reason/no error message. <!-- Reviewable:start --> - - - This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kkrt-labs/kakarot/1382) <!-- Reviewable:end -->
- Loading branch information
1 parent
c2d392b
commit 96523ab
Showing
6 changed files
with
49 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import shutil | ||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
from tests.utils.coverage import report_runs | ||
from tests.utils.reporting import dump_coverage | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
async def coverage(worker_id): | ||
|
||
output_dir = Path("coverage") | ||
shutil.rmtree(output_dir, ignore_errors=True) | ||
|
||
yield | ||
|
||
output_dir.mkdir(exist_ok=True, parents=True) | ||
files = report_runs(excluded_file={"site-packages", "tests"}) | ||
|
||
if worker_id == "master": | ||
dump_coverage(output_dir, files) | ||
else: | ||
dump_coverage(output_dir / worker_id, files) |