Testing the Filer class¶
-
test_filer.
test_Filer_append_existing_file
(tmp_file: helpers.filer.Filer) → None¶ Run Filer to append to an existing file
-
test_filer.
test_Filer_create
(tmp_path: pathlib.Path, create: bool, expected: List[List[Union[None, str]]]) → None¶ Run Filer to read a file that does not exist
This is parametrize to test that if fails if create = False but passes when create = True
-
test_filer.
test_Filer_delete_existing_file
(tmp_file: helpers.filer.Filer, to_del: str, expected: List[List[str]]) → None¶ Run Filer to delete a line from an existing file
This is parametrised to check conditions where a line is not deleted
-
test_filer.
test_Filer_read_existing_file
(tmp_file: helpers.filer.Filer) → None¶ Run Filer to read an existing file
-
test_filer.
test_Filer_sort_existing_file
(tmp_file: helpers.filer.Filer, header: bool, expected: List[List[str]]) → None¶ Run Filer to sort an existing file
This is parametrised to check that headers are treated properly
-
test_filer.
test_Filer_write_col_error
(tmp_file: helpers.filer.Filer) → None¶ Check that Filer.write_col raises an IndexError if col is the wrong length
-
test_filer.
test_Filer_write_existing_file
(tmp_file: helpers.filer.Filer) → None¶ Run Filer to write to an existing file