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.

15 lines
428B

  1. from contextlib import ExitStack
  2. from tests import DDS
  3. from tests.fileutil import set_contents
  4. def test_lib_with_just_test(dds: DDS, scope: ExitStack):
  5. scope.enter_context(
  6. set_contents(
  7. dds.source_root / 'src/foo.test.cpp',
  8. b'int main() {}',
  9. ))
  10. dds.build(tests=True, apps=False, warnings=False, export=False)
  11. assert (dds.build_dir / f'test/foo{dds.exe_suffix}').is_file()