Skip to content

Commit c3bb3bc

Browse files
author
Joseph G. Shuttleworth
committed
Uncouple tests from directory_builder
1 parent e377e35 commit c3bb3bc

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

tests/test_herg_qc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import numpy as np
88
from syncropatch_export.trace import Trace
99

10-
from pcpostprocess import directory_builder
1110
from pcpostprocess.hergQC import NOISE_LEN, hERGQC
1211

1312

@@ -56,8 +55,7 @@ def setUp(self):
5655
if vend == vstart
5756
]
5857

59-
plot_dir = directory_builder.setup_output_directory("test_output",
60-
self.__class__.__name__)
58+
plot_dir = os.makedirs("test_output", self.__class__.__name__, exists_ok=True)
6159

6260
self.hergqc = hERGQC(
6361
sampling_rate=sampling_rate,

tests/test_leak_correct.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from syncropatch_export.trace import Trace
66

7-
from pcpostprocess import directory_builder, leak_correct
7+
from pcpostprocess import leak_correct
88
from pcpostprocess.detect_ramp_bounds import detect_ramp_bounds
99

1010

@@ -14,8 +14,7 @@ def setUp(self):
1414
"staircaseramp (2)_2kHz_15.01.07")
1515
json_file = "staircaseramp (2)_2kHz_15.01.07.json"
1616

17-
self.output_dir = directory_builder.setup_output_directory("test_output",
18-
self.__class__.__name__)
17+
self.output_dir = os.makedirs("test_output", self.__class__.__name__, exists_ok=True)
1918

2019
self.test_trace = Trace(test_data_dir, json_file)
2120

tests/test_subtraction_plots.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import matplotlib.pyplot as plt
66
from syncropatch_export.trace import Trace
77

8-
from pcpostprocess import directory_builder
98
from pcpostprocess.detect_ramp_bounds import detect_ramp_bounds
109
from pcpostprocess.subtraction_plots import do_subtraction_plot
1110

@@ -21,8 +20,8 @@ def setUp(self):
2120
json_file_before = "staircaseramp (2)_2kHz_15.01.07.json"
2221
json_file_after = "staircaseramp (2)_2kHz_15.11.33.json"
2322

24-
self.output_dir = directory_builder.setup_output_directory("test_output",
25-
self.__class__.__name__)
23+
self.output_dir = os.makedirs("test_output", self.__class__.__name__,
24+
exists_ok=True)
2625

2726
if not os.path.exists(self.output_dir):
2827
os.makedirs(self.output_dir)

0 commit comments

Comments
 (0)