def test_absent_binary_flag(caplog, sas_source_file: SourceFile): """When a file has no information on whether it is binary, the returned line count should be None, and a warning logged.""" del sas_source_file._params['binary'] with caplog.at_level(logging.DEBUG): assert sas_source_file.get_line_count() is None assert 'No binary field available for for file beer.sas7bdat' in caplog.text
def test_binary_file_wont_return_line_count(sas_source_file: SourceFile): assert sas_source_file.get_line_count() is None
def test_get_line_count(source_file2: SourceFile): assert source_file2.get_line_count() == 4