示例#1
0
 def test_read_dir(self):
     "Reading a directory should raise"
     p = Path(self.tdir)
     with self.assertRaises(TypeError):
         p.read()
示例#2
0
 def test_read_dir(self):
     "Reading a directory should raise"
     p = Path(self.tdir)
     with self.assertRaises(TypeError):
         p.read()
示例#3
0
 def test_read(self):
     "Should read the path"
     nopath = tempfile.mkdtemp()
     p = Path(nopath) + 'myfile.txt'
     p << 'Contentz'
     self.assertEqual('Contentz', p.read())
示例#4
0
 def test_read(self):
     "Should read the path"
     nopath = tempfile.mkdtemp()
     p = Path(nopath) + 'myfile.txt'
     p << 'Contentz'
     self.assertEqual('Contentz', p.read())