Fix feature detection for pytest markers in tests
The condition was accidentally reversed during refactoring in 9730ac4c . It would result in skipped tests on builds with proper support and false negatives on builds without proper feature support.
Credit for reporting the issue and the fix goes to Stanislav Levin.
Closes #3804 (closed)