aboutsummaryrefslogtreecommitdiff
path: root/tests/test_tableflow.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-06-02 22:35:36 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-06-02 22:35:36 -0400
commitd32aaa6bce0eacd5d6ee919a239c7aaad606fc23 (patch)
tree260543a1f63f5aac49cfbc43bd305fe3f31393a2 /tests/test_tableflow.py
parent593e395eb7d17873ddddd5c57bce35d7d0c30e1d (diff)
downloadqolab-d32aaa6bce0eacd5d6ee919a239c7aaad606fc23.tar.gz
qolab-d32aaa6bce0eacd5d6ee919a239c7aaad606fc23.zip
fixed bug with table loading and made a test case for it
Diffstat (limited to 'tests/test_tableflow.py')
-rw-r--r--tests/test_tableflow.py9
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})