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

123456789101112131415161718
  1. from dds_ci import proc, paths
  2. from dds_ci.testing import ProjectOpener
  3. def test_main(project_opener: ProjectOpener) -> None:
  4. proj = project_opener.open('main')
  5. proj.build()
  6. test_exe = proj.build_root.joinpath('test/testlib/calc' + paths.EXE_SUFFIX)
  7. assert test_exe.is_file()
  8. assert proc.run([test_exe]).returncode == 0
  9. def test_custom(project_opener: ProjectOpener) -> None:
  10. proj = project_opener.open('custom-runner')
  11. proj.build()
  12. test_exe = proj.build_root.joinpath('test/testlib/calc' + paths.EXE_SUFFIX)
  13. assert test_exe.is_file()
  14. assert proc.run([test_exe]).returncode == 0