MCPcopy Index your code
hub / github.com/fastapi/sqlmodel / test_default_bool

Function test_default_bool

tests/test_default.py:4–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3
4def test_default_bool() -> None:
5 dt1 = Default(True)
6 dt2 = Default(1)
7 dt3 = Default("foo")
8 dt4 = Default(["foo"])
9 df1 = Default(False)
10 df2 = Default(0)
11 df3 = Default("")
12 df4: list = Default([])
13 df5 = Default(None)
14
15 assert not not dt1
16 assert not not dt2
17 assert not not dt3
18 assert not not dt4
19 assert not df1
20 assert not df2
21 assert not df3
22 assert not df4
23 assert not df5
24
25
26def test_equality() -> None:

Callers

nothing calls this directly

Calls 1

DefaultFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…