コード例 #1
0
ファイル: test_reports.py プロジェクト: klmitch/tugboat
    def test_no_pulls(self):
        repo = mock.Mock(full_name='repo')

        reports._verbose_callback(1, 3, repo)

        self.assertEqual(sys.stderr.getvalue(),
                         'Processing repository "repo" (2/3)... ')
コード例 #2
0
    def test_no_pulls(self):
        repo = mock.Mock(full_name='repo')

        reports._verbose_callback(1, 3, repo)

        self.assertEqual(sys.stderr.getvalue(),
                         'Processing repository "repo" (2/3)... ')
コード例 #3
0
ファイル: test_reports.py プロジェクト: klmitch/tugboat
    def test_with_pulls(self):
        repo = mock.Mock(full_name='repo')
        pulls = [
            mock.Mock(mergeable=True),
            mock.Mock(mergeable=False),
            mock.Mock(mergeable=True),
        ]

        reports._verbose_callback(1, 3, repo, pulls)

        self.assertEqual(sys.stderr.getvalue(), '3 pulls (2 mergeable)\n')
コード例 #4
0
    def test_with_pulls(self):
        repo = mock.Mock(full_name='repo')
        pulls = [
            mock.Mock(mergeable=True),
            mock.Mock(mergeable=False),
            mock.Mock(mergeable=True),
        ]

        reports._verbose_callback(1, 3, repo, pulls)

        self.assertEqual(sys.stderr.getvalue(), '3 pulls (2 mergeable)\n')