Skip to content

Commit 6035853

Browse files
ehmatthesEric Matthes
andauthored
Remove Windows-specific reference files. (#94)
* Additional assertions about filepaths that are generated during testing. Signed-off-by: Eric Matthes <eric@Erics-Mac-Studio.local> * Remove Windows-specific test files. Signed-off-by: Eric Matthes <eric@Erics-Mac-Studio.local> * Use Black formatting conventions. Signed-off-by: Eric Matthes <eric@Erics-Mac-Studio.local> --------- Signed-off-by: Eric Matthes <eric@Erics-Mac-Studio.local> Co-authored-by: Eric Matthes <eric@Erics-Mac-Studio.local>
1 parent 7c9c323 commit 6035853

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed
-393 KB
Binary file not shown.
-287 KB
Binary file not shown.
-152 KB
Binary file not shown.

tests/e2e_tests/test_core_commands.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def test_log(tmp_repo):
2323
fp_generated = Path(output.stdout.decode().strip())
2424
fp_reference = Path(__file__).parent / "reference_files/git-sim-log.png"
2525

26+
assert "git-sim-log" in str(fp_generated)
2627
assert compare_images(fp_generated, fp_reference)
2728

2829

@@ -37,6 +38,7 @@ def test_status(tmp_repo):
3738
fp_generated = Path(output.stdout.decode().strip())
3839
fp_reference = Path(__file__).parent / "reference_files/git-sim-status.png"
3940

41+
assert "git-sim-status" in str(fp_generated)
4042
assert compare_images(fp_generated, fp_reference)
4143

4244

@@ -51,4 +53,5 @@ def test_merge(tmp_repo):
5153
fp_generated = Path(output.stdout.decode().strip())
5254
fp_reference = Path(__file__).parent / "reference_files/git-sim-merge.png"
5355

56+
assert "git-sim-merge" in str(fp_generated)
5457
assert compare_images(fp_generated, fp_reference)

tests/e2e_tests/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def compare_images(path_gen, path_ref):
1616
Parameters: file path to generated and reference image files
1717
Returns: True/ False
1818
"""
19-
if os.name == "nt":
20-
# Use Windows-specific reference files.
21-
path_ref = path_ref.with_name(path_ref.stem + "_windows" + path_ref.suffix)
19+
# Verify that the path to the generated file exists.
20+
assert ".png" in str(path_gen)
21+
assert path_gen.exists()
2222

2323
img_gen = Image.open(path_gen)
2424
img_ref = Image.open(path_ref)

0 commit comments

Comments
 (0)