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)
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)
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)
def _checkout_new_branch(self, branch): sh.fossil("branch", "new", branch, "trunk") sh.fossil("checkout", branch)
def _add_and_commit(self, filename): sh.touch(filename) sh.fossil("add", filename) sh.fossil("commit", "-m", "add file " + filename)