Skip to content

Commit

Permalink
Fix typo in keyword and update unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
153957 committed Jun 28, 2024
1 parent bcdde11 commit 420b5db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/test_writer_acceptance.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def tearDown(self):
shutil.rmtree(DATASTORE_PATH / '2017')

def test_event_acceptance(self):
self.writer_app.process_data(self.pickle_filename['CIC'])
self.writer_app.process_data(self.pickle_filename['CIC'], DATASTORE_PATH)

data = self.read_table('events')
self.assertEqual(data['timestamp'], 1488093964)
Expand All @@ -86,7 +86,7 @@ def test_event_acceptance(self):
self.assertEqual(tr1, base64.decodebytes(tr1_b64))

def test_singles_acceptance(self):
self.writer_app.process_data(self.pickle_filename['SIN'])
self.writer_app.process_data(self.pickle_filename['SIN'], DATASTORE_PATH)

data = self.read_table('singles')
self.assertEqual(data['timestamp'], 1488094031)
Expand All @@ -99,7 +99,7 @@ def test_singles_acceptance(self):
self.assertEqual(len(blobs), 0)

def test_weather_acceptance(self):
self.writer_app.process_data(self.pickle_filename['WTR'])
self.writer_app.process_data(self.pickle_filename['WTR'], DATASTORE_PATH)

data = self.read_table('weather')
self.assertEqual(data['timestamp'], 1488094084)
Expand All @@ -111,7 +111,7 @@ def test_weather_acceptance(self):
self.assertEqual(len(blobs), 0)

def test_config_acceptance(self):
self.writer_app.process_data(self.pickle_filename['CFG'])
self.writer_app.process_data(self.pickle_filename['CFG'], DATASTORE_PATH)
data = self.read_table('config')
self.assertEqual(data['timestamp'], 1488125225)
self.assertEqual(data['mas_ch1_thres_high'], 320)
Expand Down
2 changes: 1 addition & 1 deletion writer/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def open_or_create_file(data_dir, date):
file = directory / f'{date.year}_{date.month}_{date.day}.h5'

# Ensure dir and parent directories exist with mode rwxr-xr-x
directory.mkdir(mode=0o755, parents=True, exists_ok=True)
directory.mkdir(mode=0o755, parents=True, exist_ok=True)

return tables.open_file(file, 'a')

Expand Down

0 comments on commit 420b5db

Please sign in to comment.