summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-07-02 18:44:00 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-07-02 18:44:00 (GMT)
commitee1e06d4975d636cbad949aef8d50de1e57e3715 (patch)
tree96955948390faa23ac6a3213335848a601da3c59 /Lib
parent762fbd34858f7df608e6da8079bf648bc7d3d8cc (diff)
downloadcpython-ee1e06d4975d636cbad949aef8d50de1e57e3715.zip
cpython-ee1e06d4975d636cbad949aef8d50de1e57e3715.tar.gz
cpython-ee1e06d4975d636cbad949aef8d50de1e57e3715.tar.bz2
Correct arithmetic in access on Win32. Fixes #1513646.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_os.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index ffc9420..faaadec 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -11,6 +11,19 @@ from test import test_support
warnings.filterwarnings("ignore", "tempnam", RuntimeWarning, __name__)
warnings.filterwarnings("ignore", "tmpnam", RuntimeWarning, __name__)
+# Tests creating TESTFN
+class FileTests(unittest.TestCase):
+ def setUp(self):
+ if os.path.exists(test_support.TESTFN):
+ os.unlink(test_support.TESTFN)
+ tearDown = setUp
+
+ def test_access(self):
+ f = os.open(test_support.TESTFN, os.O_CREAT|os.O_RDWR)
+ os.close(f)
+ self.assert_(os.access(test_support.TESTFN, os.W_OK))
+
+
class TemporaryFileTests(unittest.TestCase):
def setUp(self):
self.files = []
@@ -393,6 +406,7 @@ if sys.platform != 'win32':
def test_main():
test_support.run_unittest(
+ FileTests,
TemporaryFileTests,
StatAttributeTests,
EnvironTests,