-
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.
Benchmarks: re-add dummy test module (#5)
But skipped by default
- Loading branch information
Showing
2 changed files
with
66 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
""" | ||
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 |