Esempio n. 1
0
 def test_pipe_should_return_the_same_value_using_indentity_function(self):
     self.assertEqual(pipe(lambda x: x)(5), 5)
Esempio n. 2
0
    def test_pipe_sequence_funtions_executions(self):
        resul = pipe(str.split, len, lambda x: x + 5)('eduardo mendes')

        self.assertEqual(resul, 7)
Esempio n. 3
0
    def test_pipe_should_return_a_callable(self):
        """Check if pipe is a closure."""
        _callable = pipe(lambda x: x)

        self.assertTrue(hasattr(_callable, '__call__'))