[AZ-153] [AZ-155] [AZ-156] [AZ-158] Add augmentation, dataset formation, label validation, model split tests

Made-with: Cursor
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-03-26 23:18:17 +02:00
parent 66fe1cc918
commit 41552c5699
7 changed files with 690 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import os
import constants
def _split_encrypted(data: bytes):
part_small_size = min(
constants.SMALL_SIZE_KB * 1024, int(0.2 * len(data))
)
small = data[:part_small_size]
big = data[part_small_size:]
return small, big
def test_bt_spl_01_split_respects_size_constraint():
data = os.urandom(10000)
small, _ = _split_encrypted(data)
cap = max(constants.SMALL_SIZE_KB * 1024, int(0.2 * len(data)))
assert len(small) <= cap
def test_bt_spl_02_reassembly_equals_original():
data = os.urandom(10000)
small, big = _split_encrypted(data)
assert small + big == data