Skip to content

Commit 1beddda

Browse files
committed
Resolve Deprecation warning for python 3.12
1 parent cad1c3d commit 1beddda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_write_dwca.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_generate_dwca_without_ext(self):
5757
ns = _get_namespace(root)
5858
assert ns == "{http://rs.tdwg.org/dwc/text/}"
5959
core_node = root.find(f'{ns}{CoreOrExtType.CORE}')
60-
assert core_node
60+
assert core_node is not None
6161
fields = core_node.findall(f'{ns}field')
6262
term_fields = [f.attrib.get('term') for f in fields]
6363
assert len(term_fields) == len(sample_occ_df.columns)
@@ -96,7 +96,7 @@ def test_generate_dwca_with_ext(self):
9696
ns = _get_namespace(root)
9797
assert ns == "{http://rs.tdwg.org/dwc/text/}"
9898
core_node = root.find(f'{ns}{CoreOrExtType.CORE}')
99-
assert core_node
99+
assert core_node is not None
100100
fields = core_node.findall(f'{ns}field')
101101
term_fields = [f.attrib.get('term') for f in fields]
102102
assert len(term_fields) == len(sample_occ_df.columns)
@@ -105,7 +105,7 @@ def test_generate_dwca_with_ext(self):
105105
core_file = core_node.find(f'{ns}files').find(f'{ns}location').text
106106

107107
ext_node = root.find(f'{ns}{CoreOrExtType.EXTENSION}')
108-
assert ext_node
108+
assert ext_node is not None
109109
fields = ext_node.findall(f'{ns}field')
110110
term_fields = [f.attrib.get('term') for f in fields]
111111
assert len(term_fields) == len(sample_multimedia_df.columns)

0 commit comments

Comments
 (0)