def test_nested_any(self):
    nested_data = [False, {'a': False, 'b': (False, True)}]
    any_true = training_utils._nested_any(nested_data, lambda x: x)
    self.assertEquals(any_true, True)

    nested_data = [False, {'a': False, 'b': (False, False)}]
    any_true = training_utils._nested_any(nested_data, lambda x: x)
    self.assertEquals(any_true, False)
Example #2
0
    def test_nested_any(self):
        nested_data = [False, {'a': False, 'b': (False, True)}]
        any_true = training_utils._nested_any(nested_data, lambda x: x)
        self.assertEquals(any_true, True)

        nested_data = [False, {'a': False, 'b': (False, False)}]
        any_true = training_utils._nested_any(nested_data, lambda x: x)
        self.assertEquals(any_true, False)