Skip to content
Snippets Groups Projects
Commit 225a122a authored by David Schäfer's avatar David Schäfer
Browse files

fixed failing test

parent 8ab07695
No related branches found
No related tags found
2 merge requests!842Annotated float scheme,!827Represent all flags by DictOfSeries
......@@ -157,7 +157,7 @@ def main(
flagscol = flagscol.rename("flags")
out[k] = pd.concat([data_result[k].rename("data"), flagscol], axis=1)
writeData(writer, out.to_pandas(), outfile)
writeData(writer, out.to_pandas(fill_value=-9999 if scheme == "positional" else np.nan), outfile)
if __name__ == "__main__":
......
......@@ -38,13 +38,13 @@ POSITIONAL = [
",Battery,Battery,SM1,SM1,SM2,SM2\n",
",data,flags,data,flags,data,flags\n",
"Date,,,,,,\n",
"2016-04-01 00:00:00,nan,-9999,nan,-9999,29.3157,90000\n",
"2016-04-01 00:05:48,3573.0,9,32.685,90,nan,-9999\n",
"2016-04-01 00:15:00,nan,-9999,nan,-9999,29.3157,90000\n",
"2016-04-01 00:20:42,3572.0,9,32.7428,90,nan,-9999\n",
"2016-04-01 00:30:00,nan,-9999,nan,-9999,29.3679,90002\n",
"2016-04-01 00:35:37,3572.0,9,32.6186,90,nan,-9999\n",
"2016-04-01 00:45:00,nan,-9999,nan,-9999,29.3679,90000\n",
"2016-04-01 00:00:00,-9999,-9999,-9999.0,-9999,29.3157,90000\n",
"2016-04-01 00:05:48,3573,9,32.685,90,-9999.0,-9999\n",
"2016-04-01 00:15:00,-9999,-9999,-9999.0,-9999,29.3157,90000\n",
"2016-04-01 00:20:42,3572,9,32.7428,90,-9999.0,-9999\n",
"2016-04-01 00:30:00,-9999,-9999,-9999.0,-9999,29.3679,90002\n",
"2016-04-01 00:35:37,3572,9,32.6186,90,-9999.0,-9999\n",
"2016-04-01 00:45:00,-9999,-9999,-9999.0,-9999,29.3679,90000\n",
]
DMP = [
......@@ -91,5 +91,4 @@ def test__main__py(tmp_path, scheme, expected):
assert result.exit_code == 0, result.output
with open(outfile, "r") as f:
result = f.readlines()[:10]
print(result[4])
# assert result == expected
assert result == expected
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment