@@ -57,7 +57,7 @@ def test_generate_dwca_without_ext(self):
57
57
ns = _get_namespace (root )
58
58
assert ns == "{http://rs.tdwg.org/dwc/text/}"
59
59
core_node = root .find (f'{ ns } { CoreOrExtType .CORE } ' )
60
- assert core_node
60
+ assert core_node is not None
61
61
fields = core_node .findall (f'{ ns } field' )
62
62
term_fields = [f .attrib .get ('term' ) for f in fields ]
63
63
assert len (term_fields ) == len (sample_occ_df .columns )
@@ -96,7 +96,7 @@ def test_generate_dwca_with_ext(self):
96
96
ns = _get_namespace (root )
97
97
assert ns == "{http://rs.tdwg.org/dwc/text/}"
98
98
core_node = root .find (f'{ ns } { CoreOrExtType .CORE } ' )
99
- assert core_node
99
+ assert core_node is not None
100
100
fields = core_node .findall (f'{ ns } field' )
101
101
term_fields = [f .attrib .get ('term' ) for f in fields ]
102
102
assert len (term_fields ) == len (sample_occ_df .columns )
@@ -105,7 +105,7 @@ def test_generate_dwca_with_ext(self):
105
105
core_file = core_node .find (f'{ ns } files' ).find (f'{ ns } location' ).text
106
106
107
107
ext_node = root .find (f'{ ns } { CoreOrExtType .EXTENSION } ' )
108
- assert ext_node
108
+ assert ext_node is not None
109
109
fields = ext_node .findall (f'{ ns } field' )
110
110
term_fields = [f .attrib .get ('term' ) for f in fields ]
111
111
assert len (term_fields ) == len (sample_multimedia_df .columns )
0 commit comments