File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,31 +113,15 @@ def test_tagging(self):
113113 unique_indicator = str (time .time ()).replace ("." , "" )
114114 tag = f"test_tag_TestFlow_{ unique_indicator } "
115115 flows = openml .flows .list_flows (tag = tag )
116- if len (flows ) != 0 :
117- pytest .skip ("Tag filter returned stale/non-empty results for a unique tag" )
118-
119- try :
120- flow .push_tag (tag )
121- except openml .exceptions .OpenMLServerException as e :
122- if e .code == 105 and "document missing" in e .message .lower ():
123- pytest .skip ("Test server index is inconsistent for flow tagging" )
124- raise
125-
116+ assert len (flows ) == 0
117+ flow .push_tag (tag )
126118 flows = openml .flows .list_flows (tag = tag )
127- if len (flows ) == 0 :
128- pytest .skip ("Tag index not updated yet on test server" )
119+ assert len (flows ) == 1
129120 assert flow_id in flows ["id" ].values
130-
131- try :
132- flow .remove_tag (tag )
133- except openml .exceptions .OpenMLServerException as e :
134- if e .code == 105 and "document missing" in e .message .lower ():
135- pytest .skip ("Test server index is inconsistent for flow untagging" )
136- raise
137-
121+ flow .remove_tag (tag )
138122 flows = openml .flows .list_flows (tag = tag )
139- if len (flows ) != 0 and flow_id in flows [ "id" ]. values :
140- pytest . skip ( "Tag removal not reflected yet by test server index" )
123+ assert len (flows ) == 0
124+
141125
142126 @pytest .mark .test_server ()
143127 def test_from_xml_to_xml (self ):
You can’t perform that action at this time.
0 commit comments