diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_tableflow.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_tableflow.py b/tests/test_tableflow.py index 0ab8e76..fce3449 100644 --- a/tests/test_tableflow.py +++ b/tests/test_tableflow.py @@ -26,11 +26,20 @@ def test_table_equality_with_no_output_file_name(): assert not tIn.equals(tOut) def test_table_load_with_in_out_file_names(): + # different filenames, same content for ease of testing tIn,tOut = tblfl.loadInOutTables(inputFileName='tests/tableflow_test_data/tableIn1.csv', outputFileName='tests/tableflow_test_data/tableOut1nonProcessed.csv', comment='#') assert type(tIn) == pd.core.frame.DataFrame assert type(tOut) == pd.core.frame.DataFrame assert tIn.equals(tOut) + # different filenames, different content + tIn,tOut = tblfl.loadInOutTables(inputFileName='tests/tableflow_test_data/tableIn1.csv', outputFileName='tests/tableflow_test_data/tableOut1pariallyProcessed.csv', comment='#') + assert type(tIn) == pd.core.frame.DataFrame + assert type(tOut) == pd.core.frame.DataFrame + assert not tIn.equals(tOut) + assert 'out1' in tOut.columns + assert 'out1' not in tIn.columns + def test_for_existing_row(): tbl1 = pd.DataFrame( {'a':[1,2,3], 'b':[1,4,6]}) r = pd.Series({'a':2, 'b':4}) |