Skip to content

Commit

Permalink
Rename validate_columns_of_batch_file in test_main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
akikuno committed Apr 23, 2024
1 parent 8872daa commit fc7dc3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/src/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
def test_validate_columns_all_required_present():
columns = ["sample", "control", "allele", "name"]
# No error should be raised
main.validate_columns_of_batch_file(columns, "test_filepath")
main.validate_headers_of_batch_file(columns, "test_filepath")


def test_validate_columns_missing_required():
columns = ["sample", "control", "allele"]
with pytest.raises(ValueError, match="test_filepath must contain sample, control, allele, name in the header"):
main.validate_columns_of_batch_file(columns, "test_filepath")
main.validate_headers_of_batch_file(columns, "test_filepath")


def test_validate_columns_extra_not_accepted():
columns = ["sample", "control", "allele", "name", "extra_column"]
with pytest.raises(
ValueError, match="Accepted header names of test_filepath are sample, control, allele, name, genome."
):
main.validate_columns_of_batch_file(columns, "test_filepath")
main.validate_headers_of_batch_file(columns, "test_filepath")

0 comments on commit fc7dc3b

Please sign in to comment.