TST/CLN: centralize module check funcs
Merge pull request #7451 from sinhrks/skiptest

TST/CLN: centralize module check funcs