Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
arnor-sigurdsson committed Aug 27, 2023
1 parent e67f3db commit 68f31fb
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_prepare_genotype_array_train_mode():
na_augment_perc=1.0,
na_augment_prob=1.0,
shuffle_augment_perc=1.0,
shuffle_augment_prob=1.0,
shuffle_augment_prob=0.0,
test_mode=False,
)

Expand All @@ -28,6 +28,20 @@ def test_prepare_genotype_array_train_mode():

assert (prepared_array_train[:, -1, :] == 1).all()

prepared_array_train = prepare_omics.prepare_one_hot_omics_data(
genotype_array=test_array,
na_augment_perc=1.0,
na_augment_prob=1.0,
shuffle_augment_perc=1.0,
shuffle_augment_prob=1.0,
test_mode=False,
)

assert prepared_array_train != test_array
assert (test_array_copy == test_array).all()

assert (prepared_array_train[:, -1, :] != 1).any()


def test_prepare_genotype_array_test_mode():
test_array = torch.zeros((1, 4, 100), dtype=torch.uint8).detach().numpy()
Expand Down

0 comments on commit 68f31fb

Please sign in to comment.