You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To add a test in `populate_tests`, you need to work with 3 `sources_test.csv` files in sequence:
4
+
5
+
1.**`tests/test_data/sources_test.csv`** - The base test data file
6
+
2.**`tests/integration/test_data/sources_test.csv`** - The intermediate file where data is accumulated
7
+
3.**`tests/integration/populate_tests/test_data/sources_test.csv`** - The final file where your changes are visible
8
+
9
+
### Workflow
10
+
11
+
When running `populate_tests`:
12
+
1. It starts from the base file (`tests/test_data/sources_test.csv`)
13
+
2. Adds/merges it to the integration test data (`tests/integration/test_data/sources_test.csv`)
14
+
3. You see your final changes in the populate_tests data (`tests/integration/populate_tests/test_data/sources_test.csv`)
15
+
16
+
### Example
17
+
18
+
If you want to test a new feed scenario (like the `gtfs realtime feed references` overwrite behavior in `test_populate.py`):
19
+
1. Modify the entry in `tests/test_data/sources_test.csv` with your test data
20
+
2. Write your test assertions in `test_populate.py` to validate the expected behavior
21
+
3. Run the populate script/tests
22
+
4. Verify the results appear correctly in `tests/integration/populate_tests/test_data/sources_test.csv`
23
+
24
+
25
+
---
26
+
27
+
This cascading approach ensures that base test data flows through the system and allows you to verify how the populate process handles data merging and updates.
0 commit comments