@@ -139,7 +139,7 @@ def test_from_file(lxml_only):
139139 filepath = join (examples_path , 'example_5.mff' , 'categories.xml' )
140140 assert exists (filepath ), f"Not found: '{ filepath } '"
141141 output = XML .from_file (filepath )
142- assert type (output ) == type (XML )._tag_registry ['categories' ]
142+ assert isinstance (output , type (XML )._tag_registry ['categories' ])
143143 expected_names = ['Category A_' , 'Category B_' , 'Category C_' ]
144144 category_names = sorted (output .categories .keys ())
145145 assert category_names == expected_names
@@ -446,7 +446,7 @@ def test_EventTrack_to_xml():
446446 xml_stream .seek (0 )
447447 # read the .xml and test content
448448 output = XML .from_file (xml_stream )
449- assert type (output ) == type (XML )._tag_registry ['eventTrack' ]
449+ assert isinstance (output , type (XML )._tag_registry ['eventTrack' ])
450450 assert output .name == name
451451 assert output .trackType == trackType
452452 assert len (output .events ) == len (events )
@@ -550,7 +550,7 @@ def test_Categories_to_xml(channel_status):
550550 xml_stream .seek (0 )
551551 # read the .xml and test content
552552 output = XML .from_file (xml_stream )
553- assert type (output ) == type (XML )._tag_registry ['categories' ]
553+ assert isinstance (output , type (XML )._tag_registry ['categories' ])
554554 categories = output .categories
555555 for name , category in categories .items ():
556556 expected_category = expected_categories [name ]
@@ -664,7 +664,7 @@ def test_history_to_xml():
664664 xml_declaration = True , method = 'xml' )
665665 xml_stream .seek (0 )
666666 output = XML .from_file (xml_stream )
667- assert type (output ) == type (XML )._tag_registry ['historyEntries' ]
667+ assert isinstance (output , type (XML )._tag_registry ['historyEntries' ])
668668 assert len (output ) == len (entries )
669669 for entry , expected in zip (entries , output .entries ):
670670 assert entry == expected
0 commit comments