Skip to content

Commit

Permalink
remove tests/functional/deprecations/00-pre-cylc8.t in favour of an i…
Browse files Browse the repository at this point in the history
…ntegration test
  • Loading branch information
wxtim committed Jan 15, 2024
1 parent 7150a09 commit a81e8c9
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 61 deletions.
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ doctest_optionflags =
asyncio_mode = auto
markers=
linkcheck: Test links
compatmode: Tests a feature of Cylc 7 compatibility mode
40 changes: 0 additions & 40 deletions tests/functional/deprecations/00-pre-cylc8.t

This file was deleted.

20 changes: 0 additions & 20 deletions tests/functional/deprecations/00-pre-cylc8/flow.cylc

This file was deleted.

48 changes: 47 additions & 1 deletion tests/integration/scripts/test_validate_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ 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)
"""
id_ = flow({
'scheduler': {'allow implicit tasks': True},
'scheduling': {'dependencies': {'graph': 'foo'}}
Expand All @@ -108,4 +111,47 @@ def test_validate_simple_graph(flow, validate, caplog):
'\n * (8.0.0) [scheduling][dependencies][X]graph'
' -> [scheduling][graph]X - for X in:\n graph'
)
assert expect in caplog.messages
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):
"""Test all current non-silent workflow obsoletions and deprecations.
"""
id_ = flow({
'cylc': {
'events': {
'reset timer': 10,
'reset inactivity timer': 15,
}
},
"scheduling": {
"initial cycle point": "20150808T00",
"final cycle point": "20150808T00",
"graph": {
"P1D": "foo => cat & dog"
},
"special tasks": {
"external-trigger": 'cat("meow available")'
}
},
'runtime': {
'foo, cat, dog': {
'suite state polling': {'template': ''},
'events': {'reset timer': 20}
}
}
})
validate(id_)
assert warning in caplog.messages

0 comments on commit a81e8c9

Please sign in to comment.