fix: preserve safe stop and explicit forced interruption lifecycle
This commit is contained in:
1 parent
b939101565
commit
9c03cd5900
29 files changed
+1829
-86
No files matched your search
@@ -253,6 +253,31 @@ End Sub''', routines)
|
||||
'Sub QPVerifyUntouched(ByRef Records)\n' + injection)
|
||||
|
||||
|
||||
def test_save_then_project_close_refusal_retains_save_boundary(tmp_path):
|
||||
run_vbs(tmp_path, 'part_number', '''
|
||||
Dim FullChecks
|
||||
FullChecks=0
|
||||
Command.Add "project_path",QPProjectPath()
|
||||
QP_BatchMode=True: QP_SessionMode=True
|
||||
QP_SessionToken=String(32,"b")
|
||||
QP_OwnedProject=True: QP_OwnedProjectPath=QPProjectPath()
|
||||
QPRestoreAfterOperatorReplace Command,SnapshotPath
|
||||
QP_App.RefuseClose=True
|
||||
On Error Resume Next
|
||||
QPFinishBatchItem
|
||||
Failure=Err.Number
|
||||
Err.Clear
|
||||
On Error GoTo 0
|
||||
Require Failure<>0,"refused close must stop the operation"
|
||||
Require QP_BatchSaveCommitted,"returned save was lost when project close failed"
|
||||
QP_App.RefuseClose=False
|
||||
QPDiscardFailedBatchProject CloseError
|
||||
Require Len(CloseError)>0,"uncertain save must not discard the open project"
|
||||
Require Len(QPProjectPath())>0,"failed saved project was silently discarded"
|
||||
Require Not QP_Fso.FileExists(QP_Fso.BuildPath(QP_Root,"project-session-result.tsv")),"failure published success"
|
||||
''', routines_transform=_batch_readback_fixture)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('fault', ['', 'before_save', 'after_reopen'])
|
||||
def test_owned_batch_checks_full_state_at_save_and_disk_boundaries(tmp_path, fault):
|
||||
run_vbs(tmp_path, 'part_number', '''
|
||||
|
||||
Reference in new issue
Block a user