summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dbm_dumb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_dbm_dumb.py')
-rw-r--r--Lib/test/test_dbm_dumb.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_dbm_dumb.py b/Lib/test/test_dbm_dumb.py
index e233929..208bc4c 100644
--- a/Lib/test/test_dbm_dumb.py
+++ b/Lib/test/test_dbm_dumb.py
@@ -37,11 +37,9 @@ class DumbDBMTestCase(unittest.TestCase):
self.read_helper(f)
f.close()
+ @unittest.skipUnless(hasattr(os, 'umask'), 'test needs os.umask()')
+ @unittest.skipUnless(hasattr(os, 'chmod'), 'test needs os.chmod()')
def test_dumbdbm_creation_mode(self):
- # On platforms without chmod, don't do anything.
- if not (hasattr(os, 'chmod') and hasattr(os, 'umask')):
- return
-
try:
old_umask = os.umask(0o002)
f = dumbdbm.open(_fname, 'c', 0o637)