File tree Expand file tree Collapse file tree
libensemble/tests/unit_tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -936,6 +936,25 @@ def test_non_existent_app_mpi():
936936 assert 0
937937
938938
939+ def test_non_existent_app_precedent ():
940+ """Tests exception on non-existent app is not thrown if precedent is set.
941+ This is common when running apps in containers, where the executable is not
942+ check-able from the host system."""
943+ from libensemble .executors .executor import Executor
944+
945+ print (f"\n Test: { sys ._getframe ().f_code .co_name } \n " )
946+
947+ exctr = Executor ()
948+
949+ # Can register a non-existent app in case created as part of workflow.
950+ exctr .register_app (full_path = non_existent_app , app_name = "nonexist" )
951+
952+ w_exctr = Executor .executor # simulate on worker
953+
954+ # all should be ok
955+ w_exctr .submit (app_name = "nonexist" , dry_run = True )
956+
957+
939958def test_man_signal_unrec_tag ():
940959 print (f"\n Test: { sys ._getframe ().f_code .co_name } \n " )
941960
@@ -990,5 +1009,6 @@ def test_man_signal_unrec_tag():
9901009 test_dry_run ()
9911010 test_non_existent_app ()
9921011 test_non_existent_app_mpi ()
1012+ test_non_existent_app_precedent ()
9931013 test_man_signal_unrec_tag ()
9941014 teardown_module (__file__ )
You can’t perform that action at this time.
0 commit comments