Closed Bobronium closed 3 years ago
Is it just me, or the first one reads more natural than the second one?
assert snapshot.match('value')
snapshot.assert_match('value)
Second one reminds me of unittests's assert methods 😢
unittests
Another option is assert snapshot == value, but it breaks common actual == expected pattern, so I'm not sure whether it should be used.
assert snapshot == value
actual == expected
Thank you for the great idea! I totally agree with you, syntax with assert looks more natural. I actually didn't like pytest-mock because of mocked.assert_called_once() 😅
pytest-mock
mocked.assert_called_once()
Is it just me, or the first one reads more natural than the second one?
Second one reminds me of
unittests
's assert methods 😢Another option is
assert snapshot == value
, but it breaks commonactual == expected
pattern, so I'm not sure whether it should be used.