Skip to content

Commit

Permalink
make test OS independent
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Makus committed Dec 10, 2024
1 parent 066fdda commit 1a35357
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/test_waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Author: Peter Makus (makus@gfz-potsdam.de)
Created: Monday, 15th March 2021 03:33:25 pm
Last Modified: Monday, 25th November 2024 03:15:26 pm (J. Lehr)
Last Modified: Tuesday, 10th December 2024 04:10:33 pm
'''

import unittest
Expand Down Expand Up @@ -145,8 +145,10 @@ def test_init(self, mock_setinv,
test_config = deepcopy(config)
sc = waveform.Local_Store_Client(test_config)

self.assertEqual(sc.sds_root, os.path.join(
test_config["proj_dir"], test_config["sds_dir"]))
self.assertEqual(os.path.abspath(sc.sds_root),
os.path.join(
os.path.abspath(test_config["proj_dir"]),
os.path.abspath(test_config["sds_dir"])))
self.assertIsInstance(sc.rclient, waveform.sds.Client)
self.assertIsInstance(sc.lclient, waveform.sds.Client)
mock_makedirs.assert_called_once_with(test_config["proj_dir"],
Expand Down Expand Up @@ -176,8 +178,10 @@ def test_init_without_default_paths(

sc = waveform.Local_Store_Client(test_config)

self.assertEqual(sc.sds_root, os.path.join(
test_config["proj_dir"], test_config["sds_dir"]))
self.assertEqual(os.path.abspath(sc.sds_root),
os.path.join(
os.path.abspath(test_config["proj_dir"]),
os.path.abspath(test_config["sds_dir"])))
self.assertIsInstance(sc.rclient, waveform.sds.Client)
self.assertIsInstance(sc.lclient, waveform.sds.Client)
mock_makedirs.assert_called_once_with(test_config["proj_dir"],
Expand Down

0 comments on commit 1a35357

Please sign in to comment.