diff --git a/.github/workflows/engine_pr_test.yml b/.github/workflows/engine_pr_test.yml index 5fe1b2062bc5..019390e74b7f 100644 --- a/.github/workflows/engine_pr_test.yml +++ b/.github/workflows/engine_pr_test.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: os: [ubuntu-24.04] - python-version: ["3.11"] + python-version: ["3.12"] env: GITHUB_HEAD_REF: ${{ github.head_ref }} FROM_FORK: ${{ github.event.pull_request.head.repo.fork }} diff --git a/openquake/commonlib/readinput.py b/openquake/commonlib/readinput.py index 75047560b9c9..f0d47ef4d940 100644 --- a/openquake/commonlib/readinput.py +++ b/openquake/commonlib/readinput.py @@ -1262,8 +1262,8 @@ def _taxonomy_mapping(filename, taxidx): if 'conversion' in tmap_df.columns: # conversion was the old name in the header for engine <= 3.12 tmap_df = tmap_df.rename(columns={'conversion': 'risk_id'}) - assert set(tmap_df) == {'country', 'loss_type', 'taxonomy', 'risk_id', 'weight'} - + assert set(tmap_df) == {'country', 'loss_type', 'taxonomy', 'risk_id', 'weight' + }, set(tmap_df) taxos = set() for (taxo, lt), df in tmap_df.groupby(['taxonomy', 'loss_type']): taxos.add(taxo) diff --git a/openquake/hazardlib/tests/pmf_test.py b/openquake/hazardlib/tests/pmf_test.py index d2f527fca4da..899f470363fd 100644 --- a/openquake/hazardlib/tests/pmf_test.py +++ b/openquake/hazardlib/tests/pmf_test.py @@ -24,8 +24,8 @@ def test_creation(self): self.assertEqual(pmf.data, [(0.1, i) for i in range(10)]) def test_wrong_sum(self): - data = [(0.1, i) for i in range(10)] - self.assertRaises(ValueError, PMF, data, 1E-16) + data = [(0.100001, i) for i in range(10)] + self.assertRaises(ValueError, PMF, data, 1E-10) def test_empty_data(self): self.assertRaises(ValueError, PMF, [])