Add minimum number of files for labelling test
This commit is contained in:
parent
640d0e79f8
commit
e0339bf44b
|
@ -248,10 +248,11 @@ kind = {{ stdout = "blahblah.txt" }}
|
|||
|
||||
rng = Random()
|
||||
seed = rng.randint(0, 9001)
|
||||
seed = 7555
|
||||
print(f"seed: {seed}")
|
||||
rng.seed(seed)
|
||||
initial_descriptor, _ = generate_random_dir(rng, src_path, 32)
|
||||
|
||||
# min_files is 8 because we need enough files to use each label for this test to succeed.
|
||||
initial_descriptor, _ = generate_random_dir(rng, src_path, 32, min_files=8)
|
||||
labellings = generate_labels(initial_descriptor, rng)
|
||||
save_labelling_rules(labelling_path.joinpath("srca.zst"), labellings)
|
||||
|
||||
|
@ -281,7 +282,7 @@ kind = {{ stdout = "blahblah.txt" }}
|
|||
|
||||
contents = extracted_dir_descriptor_wrapper.contents
|
||||
|
||||
self.assertEqual(len(contents), 1)
|
||||
self.assertEqual(len(contents), 1, contents)
|
||||
key, value = next(iter(contents.items()))
|
||||
self.assertTrue(key.startswith("srca+"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue