codegen tests: fix on_win32 detection
codegen tests are incorrectly skipped on osx due to on_win32 checking for win in sys.platform. On osx sys.platform is darwin.
codegen tests are incorrectly skipped on osx due to on_win32 checking for win in sys.platform. On osx sys.platform is darwin.