File: test_scaled_dtypes.py

package info (click to toggle)
python-bitstring 4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,312 kB
  • sloc: python: 11,397; makefile: 8; sh: 7
file content (13 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
from __future__ import annotations

import sys
from bitstring import BitArray, Dtype

sys.path.insert(0, '..')

def test_simple_scaled_dtype():
    d = Dtype('u4', scale=2)
    assert d.scale == 2
    b = BitArray('0x01')
    assert d.parse(b) == 2