-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from ESA-APEx/apex5-s3-upload
Benchmarks: add pytest plugin to automatically upload generated assets to S3
- Loading branch information
Showing
11 changed files
with
436 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
report/ | ||
tmp_path_root/ |
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,46 @@ | ||
""" | ||
Dummy tests to to help with tooling development. | ||
Note that this test module will be skipped by default. | ||
Use the `--dummy` runtime option to run these tests | ||
and skip all other non-dummy tests. | ||
""" | ||
|
||
import pytest | ||
|
||
|
||
@pytest.mark.parametrize("y", [4, 5, 6]) | ||
def test_tracking(track_metric, y): | ||
x = 3 | ||
track_metric("x squared", x * x) | ||
track_metric("y", y) | ||
assert x + y == 8 | ||
|
||
|
||
def test_simple_success(): | ||
x = 3 | ||
assert x + 5 == 8 | ||
|
||
|
||
def test_simple_fail(): | ||
x = 3 | ||
assert x + 5 == "eight" | ||
|
||
|
||
def test_produce_files_success(tmp_path): | ||
path = tmp_path / "hello.txt" | ||
path.write_text("Hello, world.\n") | ||
|
||
|
||
def test_produce_files_fail(tmp_path): | ||
path = tmp_path / "hello.txt" | ||
path.write_text("Hello, world.\n") | ||
assert 1 == 2 | ||
|
||
|
||
@pytest.mark.parametrize("x", [3, 5]) | ||
def test_upload_assets(tmp_path, upload_assets_on_fail, x): | ||
path = tmp_path / "hello.txt" | ||
path.write_text("Hello, world.\n") | ||
upload_assets_on_fail(path) | ||
assert x == 5 |
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
Oops, something went wrong.