File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from pathlib import Path
2+ import sys
3+
4+ import pandas as pd
5+
6+
7+ REPO_ROOT = Path (__file__ ).resolve ().parents [1 ]
8+ sys .path .insert (0 , str (REPO_ROOT ))
9+
10+ from versions .v3 .src .reconciliation .run_v3_pipeline import run_v3_pipeline # noqa: E402
11+
12+
13+ def test_run_v3_pipeline_creates_expected_outputs ():
14+ result = run_v3_pipeline ()
15+
16+ output_dir = REPO_ROOT / "versions" / "v3" / "output"
17+
18+ expected_outputs = [
19+ "validation_issues.csv" ,
20+ "canonical_bank_transactions.csv" ,
21+ "canonical_internal_transactions.csv" ,
22+ "pipeline_run_summary.csv" ,
23+ ]
24+
25+ for filename in expected_outputs :
26+ assert (output_dir / filename ).exists (), f"Missing pipeline output: { filename } "
27+
28+ assert result ["run_id" ].startswith ("v3_local_run_" )
29+ assert result ["canonical_bank_count" ] == 595
30+ assert result ["canonical_ledger_count" ] == 600
31+ assert result ["validation_issue_count" ] >= 1
32+
33+ summary = pd .read_csv (output_dir / "pipeline_run_summary.csv" )
34+
35+ assert set (summary ["stage" ]) == {
36+ "schema_validation" ,
37+ "bank_standardization" ,
38+ "ledger_standardization" ,
39+ }
You can’t perform that action at this time.
0 commit comments