Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

test_config_template.py 802B

1234567891011121314151617181920212223242526
  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()