@@ -47,22 +47,32 @@ def test_build_tps_network(cv_and_states):
4747def test_build_mistis_network (cv_and_states , unidirectional_tis_compiler ):
4848 cv , state_A , state_B = cv_and_states
4949 mistis_dict = {
50- 'interface_sets' : [{
51- 'initial_state' : "A" ,
52- 'final_state' : "B" ,
53- 'cv' : 'cv' ,
54- 'minvals' : 'float("-inf")' ,
55- 'maxvals' : "np.array([0, 0.1, 0.2]) * np.pi"
56- }]
50+ 'interface_sets' : [
51+ {
52+ 'initial_state' : "A" ,
53+ 'final_state' : "B" ,
54+ 'cv' : 'cv' ,
55+ 'minvals' : 'float("-inf")' ,
56+ 'maxvals' : "np.array([0, 0.1, 0.2]) * np.pi"
57+ },
58+ {
59+ 'initial_state' : "B" ,
60+ 'final_state' : "A" ,
61+ 'cv' : 'cv' ,
62+ 'minvals' : "np.array([1.0, 0.9, 0.8])" ,
63+ 'maxvals' : "float('inf')" ,
64+ }
65+ ]
5766 }
5867
5968 with mock .patch .dict (_COMPILERS_LOC , unidirectional_tis_compiler ):
6069 network = MISTIS_NETWORK_PLUGIN (mistis_dict )
6170
6271 assert isinstance (network , paths .MISTISNetwork )
63- assert len (network .sampling_transitions ) == 1
64- assert len (network .transitions ) == 1
65- assert list (network .transitions ) == [(state_A , state_B )]
72+ assert len (network .sampling_transitions ) == 2
73+ assert len (network .transitions ) == 2
74+ assert list (network .transitions ) == [(state_A , state_B ),
75+ (state_B , state_A )]
6676
6777def test_build_tis_network (cv_and_states , unidirectional_tis_compiler ):
6878 cv , state_A , state_B = cv_and_states
0 commit comments