def test_mkdir(self): filename = str(udir.join('test_mkdir.dir')) rposix.mkdir(filename, 0) exc = py.test.raises(OSError, rposix.mkdir, filename, 0) assert exc.value.errno == errno.EEXIST if sys.platform == 'win32': assert exc.type is WindowsError
def test_mkdir(self): filename = str(udir.join('test_mkdir.dir')) rposix.mkdir(filename, 0777) with py.test.raises(OSError) as excinfo: rposix.mkdir(filename, 0777) assert excinfo.value.errno == errno.EEXIST if sys.platform == 'win32': assert excinfo.type is WindowsError
def f(): rposix.mkdir(self.path, 0777) rposix.chdir(self.path)