Skip to content

Commit

Permalink
🐛 create separate set
Browse files Browse the repository at this point in the history
  • Loading branch information
paarriagadap committed Apr 16, 2024
1 parent fab3eee commit 22abc7a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions snapshots/wb/2024-03-27/pip_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1476,12 +1476,10 @@ def concurrent_function_china_india():
# I check if the set of regions is the same in the df and in the aux table (list of regions) + World (excluding China) + World (excluding India)
aux_dict = pip_aux_tables(wb_api, table="regions")

# Define countries in aux_dict["regions"]["region"] + World (excluding China) + World (excluding India)
assert set(results_region["country"]) == set(aux_dict["regions"]["region"]) | {
"World (excluding China)",
"World (excluding India)",
}, log.fatal(
f"List of regions is not the same! Differences: {set(results_region['country']) - set(aux_dict['regions']['region']) | {'World (excluding China)', 'World (excluding India)'}}"
countries_to_check = set(aux_dict["regions"]["region"]) | {"World (excluding China)", "World (excluding India)"}

assert set(results_region["country"]) == (countries_to_check), log.fatal(
f"List of regions is not the same! Differences: {set(results_region['country']) - countries_to_check}"
)

# Concatenate df_country and df_region
Expand Down

0 comments on commit 22abc7a

Please sign in to comment.