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

26 行
804B

  1. from time import sleep
  2. from tests import DDS, dds_fixture_conf_1
  3. @dds_fixture_conf_1('copy_only')
  4. def test_config_template(dds: DDS) -> None:
  5. generated_fpath = dds.build_dir / '__dds/gen/info.hpp'
  6. assert not generated_fpath.is_file()
  7. dds.build()
  8. assert generated_fpath.is_file()
  9. # Check that re-running the build will not update the generated file (the
  10. # file's content has not changed. Re-generating it would invalidate the
  11. # cache and force a false-rebuild.)
  12. start_time = generated_fpath.stat().st_mtime
  13. sleep(0.1) # Wait just long enough to register a new stamp time
  14. dds.build()
  15. new_time = generated_fpath.stat().st_mtime
  16. assert new_time == start_time
  17. @dds_fixture_conf_1('simple')
  18. def test_simple_substitution(dds: DDS) -> None:
  19. dds.build()