Skip to content

Commit fdcfd7d

Browse files
committed
(fixup) Fix naming for tests
1 parent 087a012 commit fdcfd7d

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

tests/test_components_dld.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_dld_init(mock_sqs_remi_run):
4444
ids=['channelIndex', 'channelColumn'])
4545
def test_dld_edges(mock_sqs_remi_run, pulse_dim, channel_index):
4646
dld = DelayLineDetector(mock_sqs_remi_run, 'SQS_REMI_DLD6/DET/TOP')
47-
edges = dld.get_edges(channel_index=channel_index, pulse_dim=pulse_dim)
47+
edges = dld.edges(channel_index=channel_index, pulse_dim=pulse_dim)
4848

4949
# There should be 28 edges per pulse.
5050
assert np.all(edges.groupby(['trainId', pulse_dim]).count() == 28)
@@ -67,7 +67,7 @@ def test_dld_df(mock_sqs_remi_run, key, pulse_dim):
6767
dtype = getattr(dld_mockdata, f'{key}_dt')
6868

6969
dld = DelayLineDetector(mock_sqs_remi_run, 'SQS_REMI_DLD6/DET/TOP')
70-
df = getattr(dld, f'get_{key}s')(pulse_dim)
70+
df = getattr(dld, f'{key}s')(pulse_dim)
7171

7272
assert (df.columns == list(dtype.names)).all()
7373
assert df.index.names == [
@@ -82,20 +82,20 @@ def test_dld_df(mock_sqs_remi_run, key, pulse_dim):
8282
def test_dld_pulse_align(mock_sqs_remi_run):
8383
run = mock_sqs_remi_run.select('*/DET/TOP*')
8484
dld = DelayLineDetector(run)
85-
pulses = dld.get_pulses()
86-
all_hits = dld.get_hits()
85+
pulses = dld.pulses()
86+
all_hits = dld.hits()
8787

8888
# Only trains with no pulses.
8989
dld = DelayLineDetector(run.select_trains(np.s_[:1]))
90-
assert dld.get_hits().empty
91-
assert dld.get_edges().empty
90+
assert dld.hits().empty
91+
assert dld.edges().empty
9292

9393
# Less trains for pulse information.
9494
dld = DelayLineDetector(run, pulses=pulses.select_trains(np.s_[:50]))
9595
with pytest.raises(ValueError):
96-
dld.get_hits()
96+
dld.hits()
9797

9898
# Less trains for detector data.
9999
dld = DelayLineDetector(run.select_trains(np.s_[:50]), pulses=pulses)
100-
hits = dld.get_hits()
100+
hits = dld.hits()
101101
pd.testing.assert_frame_equal(hits, all_hits.loc[np.r_[10002:10050], :])

0 commit comments

Comments
 (0)