Beispiel #1
0
 def test_LinkNotReallyNested(self):
     otherNested = tempfile.mkdtemp(dir=self.tempdir)
     linkName = os.path.join(self.nested, 'link')
     os.symlink(otherNested, linkName)
     self.assertFalse(staging._is_sub_dir(linkName, self.nested))
Beispiel #2
0
 def test_NotNested(self):
     otherNested = tempfile.mkdtemp(dir=self.tempdir)
     self.assertFalse(staging._is_sub_dir(self.nested, otherNested))
Beispiel #3
0
 def test_DotDotNotReallyNested(self):
     notReallyNested = os.path.join(self.tempdir, 'foo', os.pardir, 'bar')
     self.assertFalse(staging._is_sub_dir(self.nested, notReallyNested))
Beispiel #4
0
 def test_Nested(self):
     self.assertTrue(staging._is_sub_dir(self.nested, self.tempdir))
Beispiel #5
0
 def test_LinkNotReallyNested(self):
     otherNested = tempfile.mkdtemp(dir=self.tempdir)
     linkName = os.path.join(self.nested, 'link')
     os.symlink(otherNested, linkName)
     self.assertFalse(staging._is_sub_dir(linkName, self.nested))
Beispiel #6
0
 def test_DotDotNotReallyNested(self):
     notReallyNested = os.path.join(self.tempdir, 'foo', os.pardir, 'bar')
     self.assertFalse(staging._is_sub_dir(self.nested, notReallyNested))
Beispiel #7
0
 def test_NotNested(self):
     otherNested = tempfile.mkdtemp(dir=self.tempdir)
     self.assertFalse(staging._is_sub_dir(self.nested, otherNested))
Beispiel #8
0
 def test_Nested(self):
     self.assertTrue(staging._is_sub_dir(self.nested, self.tempdir))