Some tests require a minimum version of MediaWiki.
It would be nice to have a test decorator for unit test methods, and maybe for entire classes, that skips tests if the version is too low. (or too high?)
The decorator will fail when test class attribute net = False, and dry = True should already avoid communicating with a server as the DrySite provides a dummy method version.
If it skips entire classes, it needs to be aware of T129965.
Some examples of where this might be useful
- api_tests.TestParamInfo.test_new_mode
- page_tests.TestPageDeprecation.test_creator (method needs to be split)
- site_tests.TestSiteObjectDeprecatedFunctions.test_siteinfo_normal_call
- site_tests.TestSiteGenerators.test_protectedpages_create
- site_tests.TestRecentChanges.test_pagelist (<= 1.14)
- site_tests.TestSiteTokens
- TestSiteInfo.test_siteinfo_v1_16