File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,26 @@ def test_get_dependencies_graph(self):
300300 self .assertEqual (len (deps_g ), len (dest_g ))
301301 self .assertEqual (sorted (imported ), sorted (imported2 ))
302302
303+ def test_update_all_flag (self ):
304+ """Test env.update(all=True) forces reloading of all ontologies."""
305+ cfg = Config (search_directories = ["../brick" ])
306+ self .env = OntoEnv (config = cfg , path = self .test_dir )
307+ # Initial discovery of ontologies
308+ self .env .update ()
309+ self .assertIn (self .brick_name , self .env .get_ontology_names ())
310+
311+ ont1 = self .env .get_ontology (self .brick_name )
312+ ts1 = ont1 .last_updated
313+ self .assertIsNotNone (ts1 )
314+
315+ # Force update of all ontologies
316+ self .env .update (all = True )
317+
318+ ont2 = self .env .get_ontology (self .brick_name )
319+ ts2 = ont2 .last_updated
320+ self .assertIsNotNone (ts2 )
321+ self .assertNotEqual (ts1 , ts2 )
322+
303323
304324if __name__ == "__main__" :
305325 unittest .main ()
You can’t perform that action at this time.
0 commit comments