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.

do_test.py 916B

123456789101112131415161718192021222324252627282930313233343536
  1. import pytest
  2. import subprocess
  3. from tests import DDS, DDSFixtureParams, dds_fixture_conf, dds_fixture_conf_1
  4. dds_conf = dds_fixture_conf(
  5. DDSFixtureParams(ident='git-remote', subdir='git-remote'),
  6. DDSFixtureParams(ident='no-deps', subdir='no-deps'),
  7. )
  8. @dds_conf
  9. def test_ls(dds: DDS):
  10. dds.run(['deps', 'ls'])
  11. @dds_conf
  12. def test_deps_build(dds: DDS):
  13. assert not dds.repo_dir.exists()
  14. dds.deps_get()
  15. assert dds.repo_dir.exists(), '`deps get` did not generate a repo directory'
  16. assert not dds.lmi_path.exists()
  17. dds.deps_build()
  18. assert dds.lmi_path.exists(), '`deps build` did not generate the build dir'
  19. @dds_fixture_conf_1('use-remote')
  20. def test_use_nlohmann_json_remote(dds: DDS):
  21. dds.deps_get()
  22. dds.deps_build()
  23. dds.build(apps=True)
  24. app_exe = dds.build_dir / f'app{dds.exe_suffix}'
  25. assert app_exe.is_file()
  26. subprocess.check_call([str(app_exe)])