Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f7ef15d

Browse files
committed
Use test_support.TESTFN as the temporary filename.
Fix a minor stylistic nit. This closes SourceForge bug #117032.
1 parent ad6f2c8 commit f7ef15d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/test/test_fcntl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
import fcntl
77
import FCNTL
88
import os, sys
9-
from test_support import verbose
9+
from test_support import verbose, TESTFN
1010

11-
filename = '/tmp/delete-me'
11+
filename = TESTFN
1212

1313
# the example from the library docs
14-
f = open(filename,'w')
14+
f = open(filename, 'w')
1515
rv = fcntl.fcntl(f.fileno(), FCNTL.F_SETFL, os.O_NONBLOCK)
1616
if verbose:
1717
print 'Status from fnctl with O_NONBLOCK: ', rv

0 commit comments

Comments
 (0)