test_tool_2.py 238 B

123456789
  1. def get_temp_dir(self):
  2. if os.name == 'posix':
  3. return '/tmp'
  4. elif os.name == 'nt':
  5. import tempfile
  6. return tempfile.gettempdir()
  7. else:
  8. raise Exception("Unknown operating system [%s]" % os.name)