File: test_util.py

package info (click to toggle)
python-asdf 2.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,248 kB
  • sloc: python: 13,104; makefile: 125
file content (15 lines) | stat: -rw-r--r-- 340 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from asdf import util


def test_is_primitive():
    for value in [None, "foo", 1, 1.39, 1 + 1j, True]:
        assert util.is_primitive(value) is True

    for value in [[], tuple(), {}, set()]:
        assert util.is_primitive(value) is False


def test_not_set():
    assert util.NotSet != None

    assert repr(util.NotSet) == "NotSet"