Exemplo n.º 1
0
 def versions(self) -> List[ProjectVersion]:
     if not self._VERSIONS:
         if exists(self._versions_path):
             self._VERSIONS = [
                 ProjectVersion(self._base_path, self.id, subdir)
                 for subdir in listdir(self._versions_path)
                 if ProjectVersion.is_project_version(
                     join(self._versions_path, subdir))
             ]
     return self._VERSIONS
 def test_accepts_project_version_directory(self):
     create_file(self.uut._version_file)
     assert ProjectVersion.is_project_version(self.uut.path)
 def test_rejects_non_project_version_directory(self):
     assert not ProjectVersion.is_project_version(self.temp_dir)