def setUp(self):
        self.powerline = mock.MagicMock()

        self.dirname = tempfile.mkdtemp()
        sh.cd(self.dirname)
        sh.fossil("init", "test.fossil")
        sh.fossil("open", "test.fossil")

        self.segment = fossil.Segment(self.powerline)
Пример #2
0
    def setUp(self):
        self.powerline = mock.MagicMock()

        self.dirname = tempfile.mkdtemp()
        sh.cd(self.dirname)
        sh.fossil("init", "test.fossil")
        sh.fossil("open", "test.fossil")

        self.segment = fossil.Segment(self.powerline)
Пример #3
0
    def setUp(self):
        self.powerline = mock.MagicMock()
        self.powerline.segment_conf.side_effect = dict_side_effect_fn({
            ("vcs", "show_symbol"): False,
        })

        self.dirname = tempfile.mkdtemp()
        sh.cd(self.dirname)
        sh.fossil("init", "test.fossil")
        sh.fossil("open", "test.fossil")

        self.segment = fossil.Segment(self.powerline)
Пример #4
0
 def test_non_fossil_directory(self):
     sh.fossil("close", "--force")
     self.segment.start()
     self.segment.add_to_powerline()
     self.assertEqual(self.powerline.append.call_count, 0)
Пример #5
0
 def _checkout_new_branch(self, branch):
     sh.fossil("branch", "new", branch, "trunk")
     sh.fossil("checkout", branch)
Пример #6
0
 def _add_and_commit(self, filename):
     sh.touch(filename)
     sh.fossil("add", filename)
     sh.fossil("commit", "-m", "add file " + filename)
Пример #7
0
 def test_non_fossil_directory(self):
     sh.fossil("close", "--force")
     self.segment.start()
     self.segment.add_to_powerline()
     self.assertEqual(self.powerline.append.call_count, 0)
Пример #8
0
 def _checkout_new_branch(self, branch):
     sh.fossil("branch", "new", branch, "trunk")
     sh.fossil("checkout", branch)
Пример #9
0
 def _add_and_commit(self, filename):
     sh.touch(filename)
     sh.fossil("add", filename)
     sh.fossil("commit", "-m", "add file " + filename)