Skip to content

Commit

Permalink
Response to review: No this is testing upgraders not compat mode
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Jan 15, 2024
1 parent a81e8c9 commit 20c5272
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ doctest_optionflags =
asyncio_mode = auto
markers=
linkcheck: Test links
compatmode: Tests a feature of Cylc 7 compatibility mode
32 changes: 17 additions & 15 deletions tests/integration/scripts/test_validate_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ async def test_validate_against_source_gets_old_tvars(
validate(src_dir)


@pytest.mark.compatmode
def test_validate_simple_graph(flow, validate, caplog):
"""Test deprecation notice for Cylc 7 simple graph (no recurrence section)
"""
Expand All @@ -114,19 +113,7 @@ def test_validate_simple_graph(flow, validate, caplog):
assert expect in caplog.messages


@pytest.mark.parametrize(
'warning',
(
" * (7.8.0) [runtime][foo, cat, dog][suite state polling]template - DELETED (OBSOLETE)",
" * (7.8.1) [cylc][events]reset timer - DELETED (OBSOLETE)",
' * (7.8.1) [cylc][events]reset inactivity timer - DELETED (OBSOLETE)',
' * (7.8.1) [runtime][foo, cat, dog][events]reset timer - DELETED (OBSOLETE)',
' * (8.0.0) [runtime][foo, cat, dog][suite state polling] -> [runtime][foo, cat, dog][workflow state polling] - value unchanged',
' * (8.0.0) [cylc] -> [scheduler] - value unchanged'
)
)
@pytest.mark.compatmode
def test_pre_cylc8(flow, validate, caplog, warning):
def test_pre_cylc8(flow, validate, caplog):
"""Test all current non-silent workflow obsoletions and deprecations.
"""
id_ = flow({
Expand Down Expand Up @@ -154,4 +141,19 @@ def test_pre_cylc8(flow, validate, caplog, warning):
}
})
validate(id_)
assert warning in caplog.messages
for warning in (
(
' * (7.8.0) [runtime][foo, cat, dog][suite state polling]template'
' - DELETED (OBSOLETE)'),
' * (7.8.1) [cylc][events]reset timer - DELETED (OBSOLETE)',
' * (7.8.1) [cylc][events]reset inactivity timer - DELETED (OBSOLETE)',
(
' * (7.8.1) [runtime][foo, cat, dog][events]reset timer'
' - DELETED (OBSOLETE)'),
(
' * (8.0.0) [runtime][foo, cat, dog][suite state polling]'
' -> [runtime][foo, cat, dog][workflow state polling]'
' - value unchanged'),
' * (8.0.0) [cylc] -> [scheduler] - value unchanged'
):
assert warning in caplog.messages

0 comments on commit 20c5272

Please sign in to comment.