Peano
Loading...
Searching...
No Matches
test_binary_patch_file Namespace Reference

Functions

 values_of_patch (patch_id, name_offset=0.0, evil=False)
 
 write_file (path, binary, patches=2, datasets=("Q",), evil=False)
 
 parse (path, identifier="Q", patch_filter=None)
 
 test_text_and_binary_files_yield_the_same_patches (tmp_path, binary)
 
 test_binary_quantities_may_hold_any_bytes (tmp_path)
 
 test_other_datasets_are_stepped_over (tmp_path, binary)
 
 test_patch_filter_skips_patches (tmp_path, binary)
 

Variables

int DOF = 2
 
int UNKNOWNS = 3
 
int DIMENSIONS = 2
 
 EVIL = np.frombuffer(b"\nend pat\n", dtype=np.uint8)[:8].tobytes()
 

Function Documentation

◆ parse()

test_binary_patch_file.parse (   path,
  identifier = "Q",
  patch_filter = None 
)

◆ test_binary_quantities_may_hold_any_bytes()

test_binary_patch_file.test_binary_quantities_may_hold_any_bytes (   tmp_path)

Definition at line 93 of file test_binary_patch_file.py.

References parse().

Here is the call graph for this function:

◆ test_other_datasets_are_stepped_over()

test_binary_patch_file.test_other_datasets_are_stepped_over (   tmp_path,
  binary 
)

Definition at line 104 of file test_binary_patch_file.py.

References parse().

Here is the call graph for this function:

◆ test_patch_filter_skips_patches()

test_binary_patch_file.test_patch_filter_skips_patches (   tmp_path,
  binary 
)

Definition at line 123 of file test_binary_patch_file.py.

References parse().

Here is the call graph for this function:

◆ test_text_and_binary_files_yield_the_same_patches()

test_binary_patch_file.test_text_and_binary_files_yield_the_same_patches (   tmp_path,
  binary 
)

Definition at line 81 of file test_binary_patch_file.py.

References parse().

Here is the call graph for this function:

◆ values_of_patch()

test_binary_patch_file.values_of_patch (   patch_id,
  name_offset = 0.0,
  evil = False 
)

Definition at line 22 of file test_binary_patch_file.py.

◆ write_file()

test_binary_patch_file.write_file (   path,
  binary,
  patches = 2,
  datasets = ("Q",),
  evil = False 
)

Definition at line 36 of file test_binary_patch_file.py.

Variable Documentation

◆ DIMENSIONS

int test_binary_patch_file.DIMENSIONS = 2

Definition at line 15 of file test_binary_patch_file.py.

◆ DOF

int test_binary_patch_file.DOF = 2

Definition at line 13 of file test_binary_patch_file.py.

◆ EVIL

test_binary_patch_file.EVIL = np.frombuffer(b"\nend pat\n", dtype=np.uint8)[:8].tobytes()

Definition at line 19 of file test_binary_patch_file.py.

◆ UNKNOWNS

int test_binary_patch_file.UNKNOWNS = 3

Definition at line 14 of file test_binary_patch_file.py.