Skip to content

Merge branch 'main' into simplify_poverty_rate #1375

Merge branch 'main' into simplify_poverty_rate

Merge branch 'main' into simplify_poverty_rate #1375

GitHub Actions / Test Results failed Jan 29, 2025 in 0s

1 fail, 15 pass in 35m 27s

16 tests  ±0   15 ✅ ±0   35m 27s ⏱️ -9s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    1 ❌ ±0 

Results for commit 6a08cb6. ± Comparison against earlier commit f6e37d1.

Annotations

Check warning on line 0 in tests.test_main.TestHAPIPipelines

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_admin[themes_to_run0] (tests.test_main.TestHAPIPipelines) failed

test-results.xml [took 37s]
Raw output
#x1B[0mcheck 0 == 3
#x1B[31mtest_main.py#x1B[0m:137 in test_admin() -> check.equal(max_admin_level, 3)

------------------------------------------------------------
Failed Checks: 1
------------------------------------------------------------
self = <tests.test_main.TestHAPIPipelines object at 0x7f30e5347440>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures'
pipelines = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f30dbc16090>

    @pytest.mark.parametrize("themes_to_run", [{"nothing": None}])
    def test_admin(self, configuration, folder, pipelines):
        session = pipelines._session
        count = session.scalar(select(func.count(DBLocation.id)))
        check.equal(count, 249)
        count = session.scalar(select(func.count(DBAdmin1.id)))
        check.equal(count, 2759)
        count = session.scalar(select(func.count(DBAdmin2.id)))
        check.equal(count, 32102)
        admins = pipelines._admins
        max_admin_level = admins.get_max_admin_from_headers(
            [
                "A",
                "B",
                "Admin 1 Name",
                "c",
                "123",
                "Admin 3 Name",
                "4",
                "Admin 2 Name",
            ]
        )
        check.equal(max_admin_level, 3)
        row = {"a": 1, "Country ISO3": "AFG"}
>       admin_level = admins.get_admin_level_from_row(row, max_admin_level)
E       TypeError: Admins.get_admin_level_from_row() missing 1 required positional argument: 'max_admin_level'

tests/test_main.py:139: TypeError
#x1B[31mFAILURE: #x1B[0mcheck 0 == 3
#x1B[31mtest_main.py#x1B[0m:137 in test_admin() -> check.equal(max_admin_level, 3)

------------------------------------------------------------
Failed Checks: 1
------------------------------------------------------------
self = <tests.test_main.TestHAPIPipelines object at 0x7f30e5347440>
configuration = {'hdx_prod_site': {'url': 'https://data.humdata.org'}, 'hdx_demo_site': {'url': 'https://demo.data-humdata-org.ahconu.... markets', 'format': 'csv'}, 'unused_adm1': ['CIV', 'KEN'], 'unused_adm2': ['DOM', 'RUS', 'UGA'], 'adm1_only': ['SLV']}
folder = 'tests/fixtures'
pipelines = <hapi.pipelines.app.pipelines.Pipelines object at 0x7f30dbc16090>

    @pytest.mark.parametrize("themes_to_run", [{"nothing": None}])
    def test_admin(self, configuration, folder, pipelines):
        session = pipelines._session
        count = session.scalar(select(func.count(DBLocation.id)))
        check.equal(count, 249)
        count = session.scalar(select(func.count(DBAdmin1.id)))
        check.equal(count, 2759)
        count = session.scalar(select(func.count(DBAdmin2.id)))
        check.equal(count, 32102)
        admins = pipelines._admins
        max_admin_level = admins.get_max_admin_from_headers(
            [
                "A",
                "B",
                "Admin 1 Name",
                "c",
                "123",
                "Admin 3 Name",
                "4",
                "Admin 2 Name",
            ]
        )
        check.equal(max_admin_level, 3)
        row = {"a": 1, "Country ISO3": "AFG"}
>       admin_level = admins.get_admin_level_from_row(row, max_admin_level)
E       TypeError: Admins.get_admin_level_from_row() missing 1 required positional argument: 'max_admin_level'

tests/test_main.py:139: TypeError