MCPcopy Create free account
hub / github.com/conda/constructor / test_templates_debug_mode

Function test_templates_debug_mode

tests/test_briefcase.py:300–313  ·  view source on GitHub ↗

Test that debug logging affects template generation.

(debug_logging)

Source from the content-addressed store, hash-verified

298@pytest.mark.skipif(sys.platform != "win32", reason="Windows only")
299@pytest.mark.parametrize("debug_logging", [True, False])
300def test_templates_debug_mode(debug_logging):
301 """Test that debug logging affects template generation."""
302 info = mock_info.copy()
303 payload = Payload(info)
304 payload.add_debug_logging = debug_logging
305 rendered_templates = payload.render_templates()
306 assert len(rendered_templates) == 2
307
308 for f in rendered_templates:
309 assert f.is_file()
310 with open(f) as open_file:
311 lines = open_file.readlines()
312 expected = "@echo on\n" if debug_logging else "@echo off\n"
313 assert lines[0] == expected
314
315
316@pytest.mark.skipif(sys.platform != "win32", reason="Windows only")

Callers

nothing calls this directly

Calls 2

render_templatesMethod · 0.95
PayloadClass · 0.90

Tested by

no test coverage detected