Skip to content

Commit

Permalink
Merge pull request #24 from quant-aq/dhhagan-bug-sc-4509
Browse files Browse the repository at this point in the history
Support for new unittests
  • Loading branch information
dhhagan authored Dec 12, 2022
2 parents cb33829 + 3aba22d commit 01c1e85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ def test_concat_files_csv(self):
# are the number of lines correct?
df1 = pd.read_csv(os.path.join(self.test_files_dir, "lcs-1.csv"))
df2 = pd.read_csv(os.path.join(self.test_files_dir, "lcs-2.csv"), skiprows=1)
df3 = pd.read_csv(os.path.join(self.test_dir, "output.csv"))
df3 = pd.read_csv(os.path.join(self.test_dir, "output.csv")).sort_values('timestamp')

self.assertEqual(df1.shape[0] + df2.shape[0], df3.shape[0])

# Are the timestamps correct?
for i, (_, r) in enumerate(df2.sort_values('timestamp').head().iterrows()):
self.assertEqual(r['timestamp'], df3.loc[i, "timestamp"])

def test_concat_logfiles(self):
runner = CliRunner()
result = runner.invoke(concat,
Expand Down

0 comments on commit 01c1e85

Please sign in to comment.