Esempio n. 1
0
    def test008_output(self, mock_print):
        '''ducklings: testing output of ducklings

        Your ducklings function doesn't print Quack

        '''
        lab5.ducklings()
        mock_print.assert_has_calls([call('Quack')])
Esempio n. 2
0
    def test008_output(self, mock_print):
        '''ducklings: testing output of ducklings

        Your ducklings function doesn't print Quack

        '''
        lab5.ducklings()
        mock_print.assert_has_calls([call('Quack')])
Esempio n. 3
0
    def test010_output(self, mock_print):
        '''ducklings: testing output of ducklings

        Your ducklings function doesn't output the correct duck names

        '''
        lab5.ducklings()
        calls = [call(v) for v in
                 [l+'ack' if l not in 'QO' else l+'uack'
                  for l in 'JKLMNOPQ']]
        mock_print.assert_has_calls(calls)
Esempio n. 4
0
    def test010_output(self, mock_print):
        '''ducklings: testing output of ducklings

        Your ducklings function doesn't output the correct duck names

        '''
        lab5.ducklings()
        calls = [
            call(v) for v in
            [l + 'ack' if l not in 'QO' else l + 'uack' for l in 'JKLMNOPQ']
        ]
        mock_print.assert_has_calls(calls)