File: test_hasrepr.py

package info (click to toggle)
python-inline-snapshot 0.29.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 1,396 kB
  • sloc: python: 8,877; makefile: 37; sh: 30
file content (12 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
from inline_snapshot._code_repr import HasRepr


def test_hasrepr_eq():

    assert float("nan") == HasRepr(float, "nan")

    class Thing:
        def __repr__(self):
            return "<something>"

    assert Thing() == HasRepr(Thing, "<something>")