diff --git a/tests/test_io.py b/tests/test_io.py index fc0197f1b..c1d495b8d 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -124,7 +124,7 @@ def test_empty_file(self): with pytest.warns(match="File empty, use default line ending \n."): with open(os.path.join(TEST_DIR, "empty_file.txt"), encoding="utf-8") as f: for _line in reverse_readline(f): - raise ValueError("an empty file is being read!") + pytest.fail("No error should be thrown.") @pytest.mark.parametrize("l_end", ["\n", "\r", "\r\n"]) def test_line_ending(self, l_end): @@ -180,7 +180,7 @@ def test_empty_file(self): """ with pytest.warns(match="File empty, use default line ending \n."): for _line in reverse_readfile(os.path.join(TEST_DIR, "empty_file.txt")): - raise ValueError("an empty file is being read!") + pytest.fail("No error should be thrown.") @pytest.mark.parametrize("l_end", ["\n", "\r", "\r\n"]) def test_line_ending(self, l_end):