with Module("regression"):
with Scenario("my test"):
with Check("my check"):
value = False
result = snapshot(value,id="my_test",name="my_check")
assert result, error()
produces the following output where the value of the result is not printed.
Jun 16,2023 8:03:36 ⟥ Check my check
42ms ⟥ Exception: Traceback (most recent call last):
File "/home/user/Projects/Altinity/training/davit/using_snapshots/test.py", line 9, in <module>
assert result, error()
AssertionError: Oops! Assertion failed
The following assertion was not satisfied
assert result, error()
Assertion values
assert result, error()
^ is False
Where
File '/home/user/Projects/Altinity/training/davit/using_snapshots/test.py', line 9 in '<module>'
1| from testflows.core import *
2| from testflows.asserts import snapshot, values, error
3|
4| with Module("regression"):
5| with Scenario("my test"):
6| with Check("my check"):
7| value = False
8| result = snapshot(value,id="my_test",name="my_check")
9|> assert result, error()
10|
11|
instead we want to see output similar to
Assertion values
assert result and True, error()
^ is SnapshotError(
filename=/home/user/Projects/Altinity/training/davit/using_snapshots/snapshots/test.py.my_test.snapshot
name=my_check
snapshot_value="""
True""",
actual_value="""
False""",
diff="""
--- /home/user/Projects/Altinity/training/davit/using_snapshots/snapshots/test.py.my_test.snapshot
+++
@@ -1 +1 @@
-True
+False
""")
produces the following output where the value of the
resultis not printed.instead we want to see output similar to