def test_get_output_states_bad_input(): """MarkovNetwork.get_output_states() with bad input""" np.random.seed(32480) test_mn = MarkovNetwork(2, 4, 2) test_mn.update_input_states([-7, 2]) test_mn.activate_network() assert np.all(test_mn.get_output_states() == np.array([1, 0]))
def test_get_output_states_bad_input(): """MarkovNetwork.get_output_states() with bad input""" np.random.seed(98342) test_mn = MarkovNetwork(2, 4, 2) test_mn.update_input_states([-7, 2]) test_mn.activate_network() assert np.all(test_mn.get_output_states() == np.array([0, 1]))
def test_get_output_states(): """MarkovNetwork.get_output_states()""" np.random.seed(32480) test_mn = MarkovNetwork(2, 4, 2) test_mn.update_input_states([1, 1]) test_mn.activate_network() assert np.all(test_mn.get_output_states() == np.array([1, 0]))
def test_update_input_states_invalid_input(): """MarkovNetwork.test_update_input_states() with invalid input""" np.random.seed(98342) test_mn = MarkovNetwork(2, 4, 2) try: test_mn.update_input_states([1, 1, 0]) except Exception as e: assert type(e) is ValueError
def test_update_input_states_invalid_input(): """MarkovNetwork.test_update_input_states() with invalid input""" np.random.seed(98342) test_mn = MarkovNetwork(2, 4, 2) try: test_mn.update_input_states([1, 1, 0]) except Exception as e: assert type(e) is ValueError
def test_update_input_states(): """MarkovNetwork.test_update_input_states()""" np.random.seed(98342) test_mn = MarkovNetwork(2, 4, 2) test_mn.update_input_states([1, 1]) assert np.all(test_mn.states[:2] == np.array([1, 1]))
def test_update_input_states_bad_input(): """MarkovNetwork.test_update_input_states() with bad input""" np.random.seed(98342) test_mn = MarkovNetwork(2, 4, 2) test_mn.update_input_states([-7, 2]) assert np.all(test_mn.states[:2] == np.array([1, 1]))