def test_is_base_dir_with_no_s2marked_dir_should_return_false(self): temp = tempfile.mkdtemp() self.assertFalse(s2site.is_base_dir(temp), 'is_base_dir did not return False on an empty dir.') shutil.rmtree(temp)
def test_is_base_dir_with_s2marked_dir_should_return_true(self): temp = tempfile.mkdtemp() os.mkdir(os.path.join(temp, '.s2')) self.assertTrue(s2site.is_base_dir(temp), 'is_base_dir did not return True with s2-marked dir.') shutil.rmtree(temp)
def test_is_base_dir_with_s2marked_dir_should_return_true(self): temp = tempfile.mkdtemp() os.mkdir(os.path.join(temp,'.s2')) self.assertTrue(s2site.is_base_dir(temp), 'is_base_dir did not return True with s2-marked dir.') shutil.rmtree(temp)