1
+ from test_script import *
2
+
3
+ # This is here because pytest is too slow - so it's a faster test that avoid the collection step.
4
+ # Pytest is used in the GitHub while pushing
5
+ # This script is oriented towards fast debugging and development
6
+ # Also in the future, it might be nice to add an automated way to get the test names
7
+ test_list = [test_model_1 , test_model_2 , test_model_3 , test_model_4 , test_model_5 , test_model_6 , test_model_7 ,
8
+ test_orthogonal_spaces , test_average_value , test_hybrid_sim , test_concatenated_simulation ,
9
+ test_event_type , test_reacting_species_event , test_unit_event_test , test_reaction_deactivation ,
10
+ test_double_rate , test_single_rate , test_triple_rate , test_stochastic_event_duration ,
11
+ test_logic_operator_syntax , test_stack_position , test_empty_arguments ,
12
+ test_conditional_between_meta_species , test_conditional_between_meta_species_2 ,
13
+ test_event_reaction_not_allowed , all_test , all_test_2 , test_error_mult , test_set_counts ,
14
+ test_bool_error , test_event_all , test_one_value_concatenation_sim , test_crash_after_modification ,
15
+ test_unit_bi_dimension , test_bi_dimensional_rates , test_dimension_in_function_only ,
16
+ test_multiple_simulation_counts , test_string_events_assignment , test_plotting ,
17
+ test_volume_after_sim , test_parameters_with_sbml , test_shared_parameter_name ,
18
+ test_set_counts_parameters , test_repeated_parameters , initial_expression_test ,
19
+ test_wrong_dimension_error , test_more_than_used , zero_rate_test , test_wrong_rate ,
20
+ test_conversion_outside , test_first_characteristic_in_reacting_species , test_model_reference ,
21
+ test_sbml_generation , test_multi_sim_sbml , test_inline_comment ,
22
+ test_with_statement_any_and_species_characteristics , test_with_statement_on_any_and_event ,
23
+ test_matching_characteristic_rate , test_changes_after_compilation , test_proper_unit_context_exit ,
24
+ test_run_args , test_unit_args , test_multi_parameters_in_run , test_output_concentration_in_multi_sim ,
25
+ test_parameter_operation_in_rate , test_multi_parameter_with_expression , test_double_parameters_with_units ,
26
+ test_parameters_with_units , test_convert_back_parameter ,
27
+ test_numpy_in_expression_function , test_numpy_in_rates ,
28
+ test_numpy_in_counts , test_numpy_in_set_counts , test_multi_methods_plot , test_unit_x_conversion ,
29
+ test_Silicon_valley , test_replacing_species_name_in_expression , test_basic_assignment ,
30
+ test_all_asgn_ops , text_complex_assignments ,
31
+ text_assign_context_exit , text_even_more_complex_assignments , test_assign_context_complex ,
32
+ test_assign_context_constant , test_duration_with_run , test_rev , test_dimensionless_count ,
33
+ test_assignment_similar_species , test_blocked_names , test_blocked_names_2 ,
34
+ test_update_parameter_for_multi_model , test_update_parameter_through_str ,
35
+ test_update_multiple_parameters_in_expression , test_update_parameter_with_unit ,
36
+ test_species_value_modification , test_all_value_modification ]
37
+
38
+ # test_no_species_in_asg
39
+ # test_illegal_unit_op_in_assignment
40
+ # temporary_test_removal = [test_parameter_fit_with_units, test_multiple_runs_fit, test_simple_fit]
41
+ test_remov = [test_antimony_compose_model_gen , test_antimony_model ]
42
+ sub_test = test_list
43
+ #sub_test = [test_antimony_compose_model_gen]
44
+ def perform_tests ():
45
+ any_failed = False
46
+ for test in sub_test :
47
+ try :
48
+ test ()
49
+ print (f'Test { test } passed' )
50
+ except :
51
+ print ('\033 [91m' + f'Test { test } failed' + '\033 [0m' , file = sys .stderr )
52
+ any_failed = True
53
+ if any_failed :
54
+ assert False
55
+ perform_tests ()
0 commit comments