Verify real CBB BOM imports and handle first-open native database updates
This commit is contained in:
1 parent
a332e7bd59
commit
1b39d802bd
9 files changed
+504
-9
No files matched your search
@@ -372,6 +372,23 @@ def test_native_database_runtime_updates_reject_different_inventories(tmp_path):
|
||||
preparer.collect_inventory(project, ('old',))
|
||||
|
||||
|
||||
def test_first_open_normalization_then_runtime_updates_need_two_equal_reads(tmp_path):
|
||||
project, preparer, calls = prepared(tmp_path)
|
||||
database = project.parent / 'database' / 'icdb.dat'
|
||||
database.parent.mkdir()
|
||||
database.write_text('initial database')
|
||||
original = preparer._discover_project_sheets
|
||||
def discover(*args, **kwargs):
|
||||
result = original(*args, **kwargs)
|
||||
if len(calls) == 1:
|
||||
project.write_text('normalized project')
|
||||
database.write_text('native session metadata ' + str(len(calls)))
|
||||
return result
|
||||
preparer._discover_project_sheets = discover
|
||||
assert preparer.collect_inventory(project, ('old',))[0].refdes == 'R1'
|
||||
assert len(calls) == 3
|
||||
|
||||
|
||||
def test_unverifiable_retry_after_known_churn_still_fails_closed(tmp_path, monkeypatch):
|
||||
from dx_productivity.trial_task_center import discovery_cache as module
|
||||
project, preparer, calls = prepared(tmp_path)
|
||||
|
||||
Reference in new issue
Block a user