Use pytest monkeypatching for sys.platform