Skip to content

Commit

Permalink
tests fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Jul 28, 2024
1 parent a9224d6 commit 81a4c40
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_sdrfchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,18 @@ def test_validate_srdf_fails_on_bad_file2(shared_datadir, on_tmpdir):
expected_error = "The following columns are mandatory and not present in the SDRF: characteristics[biological replicate] -- ERROR"
assert expected_error in result.output, result.output


def test_validate_srdf_fails_on_bad_file3(shared_datadir, on_tmpdir):
"""
:return:
"""
test_sdrf = shared_datadir / "erroneous/example.sdrf.tsv"
result = run_and_check_status_code(cli, ["validate-sdrf", "--sdrf_file", str(test_sdrf)], 1)

expected_errors = ["Make sure your SDRF have a sample characteristics or data comment 'concentration of' for your factor value column 'factor value[concentration of]' -- ERROR",
"Factor 'factor value[compound]' and column 'characteristics[compound]' do not have the same values for the following rows: [11, 20] -- ERROR"]
expected_errors = [
"Make sure your SDRF have a sample characteristics or data comment 'concentration of' for your factor value column 'factor value[concentration of]' -- ERROR",
"Factor 'factor value[compound]' and column 'characteristics[compound]' do not have the same values for the following rows: [11, 20] -- ERROR",
]
for expected_error in expected_errors:
assert expected_error in result.output, result.output

Expand Down

0 comments on commit 81a4c40

Please sign in to comment.