def test_all_files(app_context): helper.touch('other-file') all_files = gitcmds.all_files(app_context) assert 'A' in all_files assert 'B' in all_files assert 'other-file' in all_files
def test_all_files(self): self.touch('other-file') all_files = gitcmds.all_files() self.assertTrue('A' in all_files) self.assertTrue('B' in all_files) self.assertTrue('other-file' in all_files)
def test_all_files(self): context = self.context self.touch('other-file') all_files = gitcmds.all_files(context) self.assertTrue('A' in all_files) self.assertTrue('B' in all_files) self.assertTrue('other-file' in all_files)
def do(self): new_additions = '' for fname in self.filenames: new_additions = new_additions + fname + '\n' for_status = new_additions if new_additions: if '.gitignore' in gitcmds.all_files(): current_list = utils.slurp('.gitignore') new_additions = new_additions + current_list utils.write('.gitignore', new_additions) _notifier.broadcast(signals.log_cmd, 0, 'Added to .gitignore:\n%s' % for_status) self.model.update_file_status()
def _initialize(self): self.setColumnCount(len(Columns.ALL)) for idx, header in enumerate(Columns.ALL): text = Columns.text(header) self.setHeaderData(idx, Qt.Horizontal, text) self._entries = {} self._dir_rows = collections.defaultdict(int) self._known_paths = set() self._dir_entries = {'': self.invisibleRootItem()} self._interesting_files = files = self.get_files() self._interesting_paths = self.get_paths(files=files) for path in gitcmds.all_files(): self.add_file(path)
def _initialize(self): """Iterate over the cola model and create GitRepoItems.""" for path in gitcmds.all_files(): self.add_file(path)