Movatterモバイル変換
[0]ホーム
[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib/test test_dumbdbm.py,NONE,1.1
Guido van Rossumguido@digicool.com
Sat, 20 Jan 2001 12:00:05 -0500
> > > > filename = '/tmp/delete_me'> > >> > > This reminds me: we need a portable way to handle test-files :)> > Yeah, I noticed that this test failed on Windows -- fixed now.>> > The test_support module exports TESTFN; there's also tempfile.mktemp()> > which should generate temporary files on all platforms.> > Is that enough?>> Well, there is one more issue, which we can't fix terribly easy: test_fcntl> tries to flock() the file. flock() doesn't work on all filesystems (like> NFS) :P If we cared a lot, we could try several alternatives (current dir,> /tmp, /var/tmp) in the specific case of flock, but personally I don't want to> bother, and real sysadmins (who should care about the test failure) are more> likely to build Python on a local disk than in their NFS-mounted> homedirectory. At least that's how we do it :-)These days, I would think that it's a pretty sure bet that thesystem's tmp directory is not on NFS. Then we could just usetempfile.mktemp() in that module, right? Or does the /tmp filesystemon Linux (which AFAIK is a RAM disk implemented in virtual memory soit uses swap space when it runs out of RAM) not support locking?I don't particularly care about fixing this -- I haven't seen bugreports about this.--Guido van Rossum (home page:http://www.python.org/~guido/)
[8]ページ先頭