Skip to content

Commit

Permalink
make list iterator in plottests
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyStegeman committed Mar 11, 2024
1 parent e84533b commit 616d4e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions validphys2/src/validphys/tests/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_plotpdfs():
Q = 10
flavours = ['g']
# plot_pdfs returns a generator with (figure, name_hint)
return API.plot_pdfs(pdfs=pdfs, Q=Q, flavours=flavours)[0]
return next(iter(API.plot_pdfs(pdfs=pdfs, Q=Q, flavours=flavours)))[0]


@pytest.mark.linux
Expand All @@ -44,13 +44,13 @@ def test_dataspecschi2():
@pytest.mark.linux
@pytest.mark.mpl_image_compare(tolerance=TOLERANCE_VALUE)
def test_plot_smpdf(single_data_internal_cuts_config):
return API.plot_smpdf(**single_data_internal_cuts_config)
return next(iter(API.plot_smpdf(**single_data_internal_cuts_config)))


@pytest.mark.linux
@pytest.mark.mpl_image_compare(tolerance=TOLERANCE_VALUE)
def test_plot_smpdf_categorical(single_data_categorical_internal_cuts_config):
return API.plot_smpdf(**single_data_categorical_internal_cuts_config)
return next(iter(API.plot_smpdf(**single_data_categorical_internal_cuts_config)))


@pytest.mark.linux
Expand Down

0 comments on commit 616d4e7

Please sign in to comment.