Browse Source

[MNT] add check learnware with conda yaml

tags/v0.3.2
Gene 2 years ago
parent
commit
2cb3e96b21
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      tests/test_learnware_client/test_check_learnware.py

+ 10
- 3
tests/test_learnware_client/test_check_learnware.py View File

@@ -14,12 +14,19 @@ class TestCheckLearnware(unittest.TestCase):


self.client = LearnwareClient() self.client = LearnwareClient()
self.client.login(email, token) self.client.login(email, token)
self.learnware_id = "00000154"


def test_check_learnware(self):
def test_check_learnware_pip(self):
learnware_id = "00000154"
with tempfile.TemporaryDirectory(prefix="learnware_") as tempdir: with tempfile.TemporaryDirectory(prefix="learnware_") as tempdir:
self.zip_path = os.path.join(tempdir, "test.zip") self.zip_path = os.path.join(tempdir, "test.zip")
self.client.download_learnware(self.learnware_id, self.zip_path)
self.client.download_learnware(learnware_id, self.zip_path)
LearnwareClient.check_learnware(self.zip_path)
def test_check_learnware_conda(self):
learnware_id = "00000148"
with tempfile.TemporaryDirectory(prefix="learnware_") as tempdir:
self.zip_path = os.path.join(tempdir, "test.zip")
self.client.download_learnware(learnware_id, self.zip_path)
LearnwareClient.check_learnware(self.zip_path) LearnwareClient.check_learnware(self.zip_path)






Loading…
Cancel
Save