/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to tests/test_annotate_config.py

  • Committer: Curtis Hovey
  • Date: 2012-02-09 02:55:06 UTC
  • mto: This revision was merged to the branch mainline in revision 776.
  • Revision ID: sinzui.is@verizon.net-20120209025506-qa8yd8livobyv5yy
Replace unsupports notify event with an new strategy to set and pane size
when the config is saved.
Hush lint.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Test the annotate configuration functionality."""
18
18
 
 
19
import os
 
20
 
19
21
from bzrlib import (
20
22
    tests,
21
23
    )
24
26
    config,
25
27
    gannotate,
26
28
    )
 
29
from bzrlib.plugins.gtk.annotate.config import gannotate_config_filename
27
30
 
28
31
 
29
32
class TestConfig(tests.TestCaseInTempDir):
45
48
        width = conf['window']['width']
46
49
        # configobj presents attributes as strings only
47
50
        self.assertIsInstance(width, str)
 
51
 
 
52
    def test_write(self):
 
53
        """The window values are save"""
 
54
        conf = config.GAnnotateConfig(self.window)
 
55
        self.window.pane.set_position(200)
 
56
        self.assertIs(False, conf._write())
 
57
        self.assertEqual(200, conf['window']['pane_position'])
 
58
        self.assertIs(True, os.path.isfile(gannotate_config_filename()))