summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bz2.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-02-15 11:58:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-02-15 11:58:23 (GMT)
commit85c3033670d493d17e633261793e83226a6a0f61 (patch)
tree322c4f4c779fd214926ab7bbdf04a87c46747b00 /Lib/test/test_bz2.py
parenta25c542c476b84b30a7172d5b4f7e2c82330f6f4 (diff)
downloadcpython-85c3033670d493d17e633261793e83226a6a0f61.zip
cpython-85c3033670d493d17e633261793e83226a6a0f61.tar.gz
cpython-85c3033670d493d17e633261793e83226a6a0f61.tar.bz2
Use os.devnull instead of hardcoded '/dev/null'.
Diffstat (limited to 'Lib/test/test_bz2.py')
-rw-r--r--Lib/test/test_bz2.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
index ce012d6..1535e8e 100644
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -87,11 +87,11 @@ class BZ2FileTest(BaseTest):
def testBadArgs(self):
self.assertRaises(TypeError, BZ2File, 123.456)
- self.assertRaises(ValueError, BZ2File, "/dev/null", "z")
- self.assertRaises(ValueError, BZ2File, "/dev/null", "rx")
- self.assertRaises(ValueError, BZ2File, "/dev/null", "rbt")
- self.assertRaises(ValueError, BZ2File, "/dev/null", compresslevel=0)
- self.assertRaises(ValueError, BZ2File, "/dev/null", compresslevel=10)
+ self.assertRaises(ValueError, BZ2File, os.devnull, "z")
+ self.assertRaises(ValueError, BZ2File, os.devnull, "rx")
+ self.assertRaises(ValueError, BZ2File, os.devnull, "rbt")
+ self.assertRaises(ValueError, BZ2File, os.devnull, compresslevel=0)
+ self.assertRaises(ValueError, BZ2File, os.devnull, compresslevel=10)
def testRead(self):
self.createTempFile()