~amirouche/lexode

lexode/tests.py -rw-r--r-- 343 bytes
6bd88a87Amirouche v0.3.0 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import lexode




def test_nominal():
    expected = [
        None, True, False,
        -2**64 + 1, -1234567890, -42, -3.14, 0, 3.14, 42, 1234567890, 2**64 - 1,
        "hello world",
        b"C0FF33B4D",
    ]
    expected.append(tuple(expected))
    expected = tuple(expected)

    assert lexode.unpack(lexode.pack(expected)) == expected