Skip to content

Commit 03eabfb

Browse files
committed
filter warning in test
1 parent 621216c commit 03eabfb

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

petab/v2/petab1to2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def update_prior(row):
524524
)
525525
# some columns were dropped in PEtab v2
526526
if v1.C.INITIALIZATION_PRIOR_TYPE in df and (
527-
df[v1.C.INITIALIZATION_PRIOR_TYPE].notna()
527+
df[v1.C.INITIALIZATION_PRIOR_TYPE].notna().any()
528528
):
529529
warnings.warn(
530530
"Initialisation priors in parameter table are not supported "

tests/v2/test_conversion.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ def test_petab1to2_remote():
3333
@pytest.mark.filterwarnings(
3434
"ignore:.*Using `log-normal` instead.*:UserWarning"
3535
)
36+
@pytest.mark.filterwarnings(
37+
"ignore:.*Initialisation priors in parameter table are not supported.*:"
38+
"UserWarning"
39+
)
40+
@pytest.mark.filterwarnings(
41+
"ignore:.*Parameter scales are not supported in PEtab v2.*:UserWarning"
42+
)
3643
@parametrize_or_skip
3744
def test_benchmark_collection(problem_id):
3845
"""Test that we can upgrade all benchmark collection models."""

0 commit comments

Comments
 (0)