您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

36 行
1.5KB

  1. from tests import dds, DDS
  2. from tests.http import RepoFixture
  3. def test_build_deps_from_file(dds: DDS, http_repo: RepoFixture):
  4. assert not dds.deps_build_dir.is_dir()
  5. http_repo.import_json_file(dds.source_root / 'catalog.json')
  6. dds.repo_add(http_repo.url)
  7. dds.build_deps(['-d', 'deps.json5'])
  8. assert (dds.deps_build_dir / 'neo-fun@0.3.0').is_dir()
  9. assert (dds.scratch_dir / 'INDEX.lmi').is_file()
  10. assert (dds.deps_build_dir / '_libman/neo-fun.lmp').is_file()
  11. assert (dds.deps_build_dir / '_libman/neo/fun.lml').is_file()
  12. def test_build_deps_from_cmd(dds: DDS, http_repo: RepoFixture):
  13. assert not dds.deps_build_dir.is_dir()
  14. http_repo.import_json_file(dds.source_root / 'catalog.json')
  15. dds.repo_add(http_repo.url)
  16. dds.build_deps(['neo-fun=0.3.0'])
  17. assert (dds.deps_build_dir / 'neo-fun@0.3.0').is_dir()
  18. assert (dds.scratch_dir / 'INDEX.lmi').is_file()
  19. assert (dds.deps_build_dir / '_libman/neo-fun.lmp').is_file()
  20. assert (dds.deps_build_dir / '_libman/neo/fun.lml').is_file()
  21. def test_multiple_deps(dds: DDS, http_repo: RepoFixture):
  22. assert not dds.deps_build_dir.is_dir()
  23. http_repo.import_json_file(dds.source_root / 'catalog.json')
  24. dds.repo_add(http_repo.url)
  25. dds.build_deps(['neo-fun^0.2.0', 'neo-fun~0.3.0'])
  26. assert (dds.deps_build_dir / 'neo-fun@0.3.0').is_dir()
  27. assert (dds.scratch_dir / 'INDEX.lmi').is_file()
  28. assert (dds.deps_build_dir / '_libman/neo-fun.lmp').is_file()
  29. assert (dds.deps_build_dir / '_libman/neo/fun.lml').is_file()