Exemplo n.º 1
0
 def test_does_not_contain_files(self):
     tempdir = self.mkdtemp()
     self.touch(os.path.join(tempdir, 'foo'))
     mismatch = DirContains(['bar', 'foo']).match(tempdir)
     self.assertThat(
         Equals(['bar', 'foo']).match(['foo']).describe(),
         Equals(mismatch.describe()))
Exemplo n.º 2
0
 def test_not_exists(self):
     doesntexist = os.path.join(self.mkdtemp(), 'doesntexist')
     mismatch = DirContains([]).match(doesntexist)
     self.assertThat(
         PathExists().match(doesntexist).describe(),
         Equals(mismatch.describe()))