~qbzr-dev/qbzr/0.22

« back to all changes in this revision

Viewing changes to lib/tests/test_cat.py

  • Committer: Gary van der Merwe
  • Author(s): Vincent Ladeuil
  • Date: 2011-01-27 22:27:15 UTC
  • mfrom: (1344.1.4 trunk)
  • Revision ID: garyvdm@gmail.com-20110127222715-sz1znm55dgzlc770
Allow tests to be run with --parallel=fork.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from bzrlib.tests import TestCase, TestCaseWithTransport
20
20
from PyQt4 import QtCore, QtGui
21
 
from bzrlib.plugins.qbzr.lib.tests import replace_report_exception
22
 
from bzrlib.plugins.qbzr.lib.tests.excepthookwatcher import TestWatchExceptHook
 
21
from bzrlib.plugins.qbzr.lib import tests as qtests
23
22
from bzrlib.plugins.qbzr.lib.cat import QBzrCatWindow
24
23
 
25
24
 
26
 
class TestCat(TestWatchExceptHook, TestCaseWithTransport):
27
 
    
28
 
    def setUp(self):
29
 
        super(TestCat, self).setUp()
30
 
        replace_report_exception(self)
31
 
    
 
25
class TestCat(qtests.QTestCase):
 
26
 
32
27
    def test_show_cat_change_encoding(self):
33
28
        tree = self.make_branch_and_tree('branch')
34
29
        self.build_tree_contents([('branch/a', 'foo\n')])
38
33
        self.addCleanup(win.close)
39
34
        win.show()
40
35
        QtCore.QCoreApplication.processEvents()
41
 
        
 
36
 
42
37
        # Change the encoding.
43
38
        encode_combo = win.encoding_selector.chooser
44
39
        encode_combo.setCurrentIndex(encode_combo.findText("ascii"))