Commits

Cat's Eye Technologies  committed 25cc714

Don't write temp files in the current directory. We were doing this to support
ghc from the Haskell Platform under Cygwin, I think. For Python it shouldn't
be necessary. If you really want this, you can always set the TMP environment
variable to "." before running falderal.

  • Participants
  • Parent commits 2dd240c

Comments (0)

Files changed (1)

File src/falderal/objects.py

         # DEPRECATED
         if '%(test-file)' in self.command:
             # choose a temp file name and write the body to that file
-            fd, test_filename = mkstemp(dir='.')
-            test_filename = basename(test_filename)
+            fd, test_filename = mkstemp()
             with open(test_filename, 'w') as file:
                 file.write(body)
                 file.close()
         # Preferred over test-file
         if '%(test-body-file)' in self.command:
             # choose a temp file name and write the body to that file
-            fd, test_filename = mkstemp(dir='.')
-            test_filename = basename(test_filename)
+            fd, test_filename = mkstemp()
             with open(test_filename, 'w') as file:
                 file.write(body)
                 file.close()
 
         if '%(test-input-file)' in self.command:
             # choose a temp file name and write the input to that file
-            fd, test_input_filename = mkstemp(dir='.')
-            test_input_filename = basename(test_input_filename)
+            fd, test_input_filename = mkstemp()
             with open(test_input_filename, 'w') as file:
                 file.write(input)
                 file.close()
 
         if '%(output-file)' in self.command:
             # choose a temp file name to read output from later
-            fd, output_filename = mkstemp(dir='.')
-            output_filename = basename(output_filename)
+            fd, output_filename = mkstemp()
             os.close(fd)
             # replace all occurrences in command
             command = re.sub(r'\%\(output-file\)', output_filename, command)