~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/devscripts/ec2test/tests/test_remote.py

  • Committer: Henning Eggers
  • Date: 2011-08-17 11:58:06 UTC
  • mto: This revision was merged to the branch mainline in revision 13724.
  • Revision ID: henning@canonical.com-20110817115806-zivq43c1fux1ia9y
Removed more lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
577
577
                    expected_part.get_payload(), observed_part.get_payload())
578
578
 
579
579
    def test_format_result_success(self):
 
580
 
580
581
        class SomeTest(TestCase):
 
582
 
581
583
            def test_a(self):
582
584
                pass
 
585
 
583
586
            def test_b(self):
584
587
                pass
 
588
 
585
589
            def test_c(self):
586
590
                pass
 
591
 
587
592
        test = unittest.TestSuite(map(SomeTest, ['test_' + x for x in 'abc']))
588
593
        result = TestResult()
589
594
        test.run(result)
614
619
Source: %(source_branch)s r%(source_revno)s
615
620
Target: %(target_branch)s r%(target_revno)s
616
621
<BLANKLINE>
617
 
%(num_tests)s tests run in %(duration)s, %(num_failures)s failures, %(num_errors)s errors
 
622
%(num_tests)s tests run in %(duration)s, %(num_failures)s failures, \
 
623
%(num_errors)s errors
618
624
<BLANKLINE>
619
625
(See the attached file for the complete log)
620
626
""" % data, doctest.REPORT_NDIFF | doctest.ELLIPSIS))
621
627
 
622
628
    def test_format_result_with_errors(self):
 
629
 
623
630
        class SomeTest(TestCase):
 
631
 
624
632
            def test_ok(self):
625
633
                pass
 
634
 
626
635
            def test_fail(self):
627
636
                self.fail("oh no")
 
637
 
628
638
            def test_error(self):
629
639
                1/0
 
640
 
630
641
        fail_test = SomeTest('test_fail')
631
642
        error_test = SomeTest('test_error')
632
643
        test = unittest.TestSuite(
662
673
Source: %(source_branch)s r%(source_revno)s
663
674
Target: %(target_branch)s r%(target_revno)s
664
675
<BLANKLINE>
665
 
%(num_tests)s tests run in %(duration)s, %(num_failures)s failures, %(num_errors)s errors
 
676
%(num_tests)s tests run in %(duration)s, %(num_failures)s failures, \
 
677
%(num_errors)s errors
666
678
<BLANKLINE>
667
679
Failing tests
668
680
-------------