コード例 #1
0
 def test_not_a_file(self):
     tempdir = self.mkdtemp()
     mismatch = FileExists().match(tempdir)
     self.assertThat("%s is not a file." % tempdir,
                     Equals(mismatch.describe()))
コード例 #2
0
 def test_not_exists(self):
     doesntexist = os.path.join(self.mkdtemp(), 'doesntexist')
     mismatch = FileExists().match(doesntexist)
     self.assertThat(PathExists().match(doesntexist).describe(),
                     Equals(mismatch.describe()))
コード例 #3
0
ファイル: test_filesystem.py プロジェクト: AIdrifter/samba
 def test_not_a_file(self):
     tempdir = self.mkdtemp()
     mismatch = FileExists().match(tempdir)
     self.assertThat(
         "%s is not a file." % tempdir, Equals(mismatch.describe()))
コード例 #4
0
 def test_exists(self):
     tempdir = self.mkdtemp()
     filename = os.path.join(tempdir, 'filename')
     self.touch(filename)
     self.assertThat(filename, FileExists())
コード例 #5
0
ファイル: test_filesystem.py プロジェクト: AIdrifter/samba
 def test_not_exists(self):
     doesntexist = os.path.join(self.mkdtemp(), 'doesntexist')
     mismatch = FileExists().match(doesntexist)
     self.assertThat(
         PathExists().match(doesntexist).describe(),
         Equals(mismatch.describe()))