Opened 15 years ago
Closed 15 years ago
#357 closed defect (fixed)
buggy test_with_statement on Windows
Reported by: | cboos | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | 0.6 |
Component: | Expression evaluation | Version: | 0.5.1 |
Keywords: | Cc: |
Description
r1090 won't work on Windows, as it uses a NamedTemporaryFile.
The doc says:
Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later).
So the with open() ... statement will fail.
Better use mkstemp, I think.
Attachments (1)
Change History (2)
Changed 15 years ago by cboos
comment:1 Changed 15 years ago by cmlenz
- Resolution set to fixed
- Status changed from new to closed
Patch applied in r1091.
Note: See
TracTickets for help on using
tickets.
Fix the failing test by using tempfile.mkstemp