File: test_hasrepr.py

package info (click to toggle)
python-inline-snapshot 0.23.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,116 kB
  • sloc: python: 6,888; makefile: 34; sh: 28
file content (12 lines) | stat: -rw-r--r-- 254 bytes parent folder | download
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>")