File: test_compatibility_regressions.py

package info (click to toggle)
execnet 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 684 kB
  • sloc: python: 5,244; makefile: 78; sh: 2
file content (32 lines) | stat: -rw-r--r-- 847 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from execnet import gateway_base


def test_opcodes() -> None:
    data = vars(gateway_base.opcode)
    computed = {k: v for k, v in data.items() if "__" not in k}
    assert computed == {
        "BUILDTUPLE": b"@",
        "BYTES": b"A",
        "CHANNEL": b"B",
        "FALSE": b"C",
        "FLOAT": b"D",
        "FROZENSET": b"E",
        "INT": b"F",
        "LONG": b"G",
        "LONGINT": b"H",
        "LONGLONG": b"I",
        "NEWDICT": b"J",
        "NEWLIST": b"K",
        "NONE": b"L",
        "PY2STRING": b"M",
        "PY3STRING": b"N",
        "SET": b"O",
        "SETITEM": b"P",
        "STOP": b"Q",
        "TRUE": b"R",
        "UNICODE": b"S",
        # added in 1.4
        # causes a regression since it was ordered in
        # between CHANNEL and FALSE as "C" moving the other items
        "COMPLEX": b"T",
    }