"""Execute the production transaction store against SQLite (SQL dialect boundary). The same C++ scenarios are separately run against isolated real MySQL/InnoDB. """ import subprocess import tempfile import unittest from pathlib import Path ROOT=Path(__file__).resolve().parents[2] class EconomyTransactions(unittest.TestCase): def test_orders_gaya_crash_replay_and_competing_buyers(self): with tempfile.TemporaryDirectory() as tmp: exe=Path(tmp)/'economy' subprocess.run(['c++','-std=c++17','-fsanitize=address,undefined','-fno-sanitize-recover=all','-I'+str(ROOT),str(ROOT/'tests/features/fixtures/economy_probe.cpp'),'-lsqlite3','-o',str(exe)],check=True) subprocess.run([str(exe),str(Path(tmp)/'economy.db')],check=True) if __name__=='__main__':unittest.main()