def test_does_not_exist_when_dir_missing(self): with temporary_dir() as tmpdir: artifact_root = os.path.join(tmpdir, 'artifacts') artifact_dir = os.path.join(tmpdir, 'cache') artifact = DirectoryArtifact(artifact_root, artifact_dir) self.assertFalse(artifact.exists())
def test_exists_when_dir_exists(self): with temporary_dir() as tmpdir: artifact_root = os.path.join(tmpdir, 'artifacts') artifact_dir = os.path.join(tmpdir, 'cache') safe_mkdir(artifact_dir) artifact = DirectoryArtifact(artifact_root, artifact_dir) self.assertTrue(artifact.exists())