Skip to content

Commit 81fe883

Browse files
authored
TST: Fix tests for pandas 3 NA/readonly behavior (#333)
1 parent b82ac1f commit 81fe883

3 files changed

Lines changed: 988 additions & 762 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies = [
4242
"pyyaml>=5.3",
4343
"scipy>=1.2",
4444
"xlrd>=1.2",
45-
"xtgeo>=2.15",
45+
"xtgeo>=4.16.2",
4646
]
4747

4848
[project.optional-dependencies]

tests/qcproperties/test_qcproperties.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,11 @@ def test_codenames(self, data_grid):
157157

158158
pdf = GridProps2df(data=data_grid, project=None, xtgdata=QCData())
159159

160-
assert {"TOP", "MID", "Below_Low_reek"} == {
161-
x for x in list(pdf.dataframe["ZONE"].unique()) if x is not None
162-
}
160+
assert {"TOP", "MID", "Below_Low_reek"} == set(
161+
pdf.dataframe["ZONE"].dropna().unique()
162+
)
163163

164-
assert {"SAND", "SHALE"} == {
165-
x for x in list(pdf.dataframe["FACIES"].unique()) if x is not None
166-
}
164+
assert {"SAND", "SHALE"} == set(pdf.dataframe["FACIES"].dropna().unique())
167165

168166

169167
class TestStatistics:

0 commit comments

Comments
 (0)