joseph-roitman / pytest-snapshot

A plugin for snapshot testing with pytest.
MIT License
114 stars 12 forks source link

Test --assert=plain behaviour and fix related bug. #50

Closed joseph-roitman closed 2 years ago

joseph-roitman commented 2 years ago

This fixes the bug mentioned in #49. The bug is that when running pytest --assert=plain, the tests would still pass even if the tested value did not equal the snapshot.

codecov[bot] commented 2 years ago

Codecov Report

Merging #50 (48457aa) into master (2d5fb6c) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #50   +/-   ##
=======================================
  Coverage   99.55%   99.56%           
=======================================
  Files           8        8           
  Lines         453      461    +8     
  Branches       54       54           
=======================================
+ Hits          451      459    +8     
  Misses          2        2           
Impacted Files Coverage Δ
pytest_snapshot/plugin.py 100.00% <100.00%> (ø)
tests/test_assert_match.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2d5fb6c...48457aa. Read the comment docs.