`Table.from_columns` fails occasionally
When initialising with a bare list of columns and colnames
, the colnames sometimes get messed up:
__________________ TestTable.test_from_columns_with_colnames ___________________
self = <km3pipe.tests.test_dataclasses.TestTable testMethod=test_from_columns_with_colnames>
def test_from_columns_with_colnames(self):
t = Table.from_columns([[1, 2, 3], [4, 5, 6]], colnames=['a', 'b'])
print("t.a: {}".format(t.a))
> assert np.allclose([1, 2, 3], t.a)
E AssertionError: assert False
E + where False = <function allclose at 0x2b120831e378>([1, 2, 3], array([4, 5, 6]))
E + where <function allclose at 0x2b120831e378> = np.allclose
E + and array([4, 5, 6]) = Generic Table <class 'km3pipe.dataclasses.Table'> (rows: 3).a
km3pipe/tests/test_dataclasses.py:200: AssertionError
----------------------------- Captured stdout call -----------------------------
t.a: [4 5 6]
-- generated xml file: /home/travis/build/tamasgal/km3pipe/reports/junit.xml ---
=============== 1 failed, 395 passed, 1 skipped in 6.18 seconds ================
Closing remaining open files:/home/travis/build/tamasgal/km3pipe/km3pipe/io/tests/../../kp-data/test_data/numu_cc_test.h5...done
make: *** [test] Error 1