Source

pypy / pypy / tool / test / test_nullpath.py

The branch 'win64-stage1' does not exist.
import sys, os
import py
from pypy.tool.nullpath import NullPyPathLocal

def test_nullpath(tmpdir):
    path = NullPyPathLocal(tmpdir)
    assert repr(path).endswith('[fake]')
    foo_txt = path.join('foo.txt')
    assert isinstance(foo_txt, NullPyPathLocal)
    #
    f = foo_txt.open('w')
    assert f.name == os.devnull