Move tests to root of the project.

This commit is contained in:
Frédéric Tronel
2026-08-29 16:12:23 +02:00
parent 0ff2e3a6dd
commit c48b77f294
-37
View File
@@ -1,37 +0,0 @@
from tscut.h264.bitstream import (
read_bit,
read_byte,
read_word
)
def test_read_bit_1():
buf = bytes(10)
for p in range(80):
pos, b = read_bit(buf, p)
assert pos == p+1 and b == 0
def test_read_bit_2():
buf = b'\xFF'*10
for p in range(80):
pos, b = read_bit(buf, p)
assert pos == p+1 and b == 1
def test_read_byte_1():
buf = bytes(10)
for p in range(10):
pos, b = read_byte(buf, p*8)
assert pos == (p+1)*8 and b == 0
def test_read_byte_2():
buf = bytes(10)
buf = b'\xFF'*10
for p in range(10):
pos, b = read_byte(buf, p*8)
assert pos == (p+1)*8 and b == 0xFF
def test_read_word_1():
buf = bytes(20)
for p in range(10):
pos, b = read_word(buf, p*16)
assert pos == (p+1)*16 and b == 0