def test_run_build_steps_empty( self, caplog: LogCaptureFixture, fake_process: FakeProcess, runway_context: RunwayContext, tmp_path: Path, ) -> None: """Test run_build_steps.""" caplog.set_level(logging.INFO, logger=MODULE) obj = CloudDevelopmentKit(runway_context, module_root=tmp_path, options={"build_steps": []}) assert not obj.run_build_steps() logs = "\n".join(caplog.messages) assert "build steps (in progress)" not in logs assert "build steps (complete)" not in logs
def test_run_build_steps_linux( self, caplog: LogCaptureFixture, fake_process: FakeProcess, mocker: MockerFixture, platform_linux: None, runway_context: RunwayContext, tmp_path: Path, ) -> None: """Test run_build_steps.""" caplog.set_level(logging.INFO, logger=MODULE) fix_windows_command_list = mocker.patch( f"{MODULE}.fix_windows_command_list") fake_process.register_subprocess(["test", "step"], returncode=0) obj = CloudDevelopmentKit(runway_context, module_root=tmp_path, options={"build_steps": ["test step"]}) assert not obj.run_build_steps() fix_windows_command_list.assert_not_called() assert fake_process.call_count(["test", "step"]) == 1 logs = "\n".join(caplog.messages) assert "build steps (in progress)" in logs assert "build steps (complete)" in logs