Added sys.platform support to tests