From 920123da05362664ba35d1b5488ec89ef5aa3b04 Mon Sep 17 00:00:00 2001 From: AdrianSosic Date: Fri, 22 Nov 2024 14:35:19 +0100 Subject: [PATCH] Select elements directly using ternary operator Co-authored-by: Martin Fitzner <17951239+Scienfitz@users.noreply.github.com> --- tests/test_campaign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_campaign.py b/tests/test_campaign.py index f44b7f488..2d80ed867 100644 --- a/tests/test_campaign.py +++ b/tests/test_campaign.py @@ -66,7 +66,7 @@ def test_candidate_toggling(constraints, exclude, complement): # Extract row indices of candidates whose metadata should have been toggled matches = campaign.searchspace.discrete.exp_rep["a"] == 0 - idx = matches.index[~matches] if complement else matches.index[matches] + idx = matches.index[~matches if complement else matches] # Assert that metadata is set correctly target = campaign._searchspace_metadata.loc[idx, _EXCLUDED]