15 Mar
2015
15 Mar
'15
12:43 p.m.
-# change to the tests directory -scriptdir = os.path.dirname(sys.argv[0]) -os.chdir(scriptdir) +if __name__ == "__main__":
- # change to the tests directory
- scriptdir = os.path.dirname(sys.argv[0])
- if scriptdir:
os.chdir(scriptdir)
Why protect this with the __main__ check? This is never imported from anywhere, so we're always in __main__ at this scope.
-logger.handle_options(LoggerOpts()) +if __name__ == "__main__":
- if not os.path.exists("logs"):
os.mkdir("logs")
- logger.handle_options(LoggerOpts())
Same.
That said, with that applied, I can run tests on windows properly.
--Dan