You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 line
853B

  1. from tests.dds import DDS, dds_fixture_conf_1
  2. @dds_fixture_conf_1('create')
  3. def test_create_sdist(dds: DDS):
  4. dds.sdist_create()
  5. sd_dir = dds.build_dir / 'foo@1.2.3.tar.gz'
  6. assert sd_dir.is_file()
  7. @dds_fixture_conf_1('create')
  8. def test_export_sdist(dds: DDS):
  9. dds.sdist_export()
  10. assert (dds.repo_dir / 'foo@1.2.3').is_dir()
  11. @dds_fixture_conf_1('create')
  12. def test_import_sdist_archive(dds: DDS):
  13. repo_content_path = dds.repo_dir / 'foo@1.2.3'
  14. assert not repo_content_path.is_dir()
  15. dds.sdist_create()
  16. assert not repo_content_path.is_dir()
  17. dds.repo_import(dds.build_dir / 'foo@1.2.3.tar.gz')
  18. assert repo_content_path.is_dir()
  19. assert repo_content_path.joinpath('library.jsonc').is_file()
  20. # Excluded file will not be in the sdist:
  21. assert not repo_content_path.joinpath('other-file.txt').is_file()