From bdd721cab60568528b756173c3a23337c879b123 Mon Sep 17 00:00:00 2001 From: sambles Date: Mon, 5 Aug 2024 14:35:08 +0100 Subject: [PATCH] Update test for OED4 - test_field_required_allow_blank_are_set_to_default (#134) --- tests/test_ods_package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_ods_package.py b/tests/test_ods_package.py index 5ba45f1..2247723 100644 --- a/tests/test_ods_package.py +++ b/tests/test_ods_package.py @@ -411,12 +411,16 @@ def test_field_required_allow_blank_are_set_to_default(self): 'use_field': True}) original_exposure.location.dataframe.drop(columns=['ContentsTIV'], inplace=True) + original_exposure.location.dataframe['ContentsTIV'] = pd.NA + original_exposure.location.dataframe['BITIV'] = pd.NA original_exposure.location.dataframe.loc[[1], 'BITIV'] = np.nan original_exposure.location.dataframe.loc[[2], 'BITIV'] = None original_exposure.location.dataframe.loc[[3], 'BITIV'] = pd.NaT original_exposure.location.dataframe.loc[[4], 'BITIV'] = '' + original_exposure.ri_info.dataframe.drop(columns='RiskLevel', inplace=True) + original_exposure.ri_info.dataframe['RiskLevel'] = pd.NA with tempfile.TemporaryDirectory() as tmp_dir: original_exposure.save(pathlib.Path(tmp_dir, 'oed'), save_config=True)