Author: Christian Tismer <tis...@stackless.com>
Branch: win64-stage1
Changeset: r50000:64d02c8953ea
Date: 2011-11-30 03:52 +0100
http://bitbucket.org/pypy/pypy/changeset/64d02c8953ea/

Log:    Merge

diff --git a/pypy/tool/nullpath.py b/pypy/tool/nullpath.py
--- a/pypy/tool/nullpath.py
+++ b/pypy/tool/nullpath.py
@@ -11,7 +11,7 @@
         return self.__class__(py.path.local.join(self, *args))
 
     def open(self, mode):
-        return open(NULLPATHNAME, mode)
+        return open(os.devnull, mode)
 
     def __repr__(self):
         return py.path.local.__repr__(self) + ' [fake]'
diff --git a/pypy/tool/test/test_nullpath.py b/pypy/tool/test/test_nullpath.py
--- a/pypy/tool/test/test_nullpath.py
+++ b/pypy/tool/test/test_nullpath.py
@@ -1,8 +1,7 @@
-import sys
+import sys, os
 import py
 from pypy.tool.nullpath import NullPyPathLocal, NULLPATHNAME
 
-
 def test_nullpath(tmpdir):
     path = NullPyPathLocal(tmpdir)
     assert repr(path).endswith('[fake]')
@@ -10,4 +9,4 @@
     assert isinstance(foo_txt, NullPyPathLocal)
     #
     f = foo_txt.open('w')
-    assert f.name == NULLPATHNAME
+    assert f.name == os.devnull
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to