/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 03:01:20 UTC
  • mto: This revision was merged to the branch mainline in revision 776.
  • Revision ID: sinzui.is@verizon.net-20120209030120-h8xypl87mfzjop2r
Verify the config data was written to file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        self.assertIsInstance(width, str)
51
51
 
52
52
    def test_write(self):
53
 
        """The window values are save"""
 
53
        """The window state and pane position is saved."""
54
54
        conf = config.GAnnotateConfig(self.window)
55
55
        self.window.pane.set_position(200)
56
56
        self.assertIs(False, conf._write())
57
57
        self.assertEqual(200, conf['window']['pane_position'])
58
 
        self.assertIs(True, os.path.isfile(gannotate_config_filename()))
 
58
        config_path = gannotate_config_filename()
 
59
        self.assertIs(True, os.path.isfile(config_path))
 
60
        with open(config_path) as config_file:
 
61
            config_data = config_file.read()
 
62
        self.assertIn('pane_position = 200', config_data)