def test_show_network_options_function(self): with catch_stdout() as out: # Disable verbose and than enable it again just # to make sure that `show_network_options` won't # trigger in the __init__ method network = algorithms.GradientDescent((2, 3, 1), verbose=False) network.verbose = True show_network_options(network) terminal_output = out.getvalue() self.assertIn('step', terminal_output)
def test_show_network_options_function(self): # Suppose not to fail with catch_stdout() as out: # Disable verbose and than enable it again just # to make sure that `show_network_options` won't # trigger in the __init__ method network = algorithms.GradientDescent((2, 3, 1), verbose=False) network.verbose = True show_network_options(network) terminal_output = out.getvalue() self.assertIn('step', terminal_output)