-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: disable inline-snapshot in CI runs
- Loading branch information
Showing
8 changed files
with
77 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -485,6 +485,7 @@ def test_L2(): | |
""" | ||
} | ||
), | ||
returncode=snapshot(1), | ||
) | ||
|
||
|
||
|
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,25 @@ | ||
from inline_snapshot import snapshot | ||
from inline_snapshot.testing._example import Example | ||
|
||
|
||
def test_ci(): | ||
Example( | ||
""" | ||
from inline_snapshot import snapshot | ||
def test_something(): | ||
assert type(snapshot(5)) is int | ||
""" | ||
).run_pytest( | ||
env={"CI": "true"}, | ||
report=snapshot( | ||
"""\ | ||
INFO: CI run was detected because environment variable "CI" was defined. | ||
INFO: inline-snapshot runs with --inline-snapshot=disabled by default in CI.\ | ||
""" | ||
), | ||
).run_pytest( | ||
["--inline-snapshot=disable"], | ||
env={"CI": "true"}, | ||
report=snapshot(""), | ||
) |
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