Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

27 lines
802B

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