/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/tests/test_blackbox.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-12-11 03:31:06 UTC
  • mfrom: (7211.8.2 fix-git-stats)
  • Revision ID: breezy.the.bot@gmail.com-20181211033106-twa1llsanwbwog94
Fix 'bzr stats' in git repositories.

Merged from https://code.launchpad.net/~jelmer/brz/fix-git-stats/+merge/359385

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
from .. import (
36
36
    tests,
37
37
    )
 
38
from ...tests.features import PluginLoadedFeature
38
39
 
39
40
 
40
41
class TestGitBlackBox(ExternalBase):
380
381
class GrepTests(ExternalBase):
381
382
 
382
383
    def test_simple_grep(self):
 
384
        self.requireFeature(PluginLoadedFeature('grep'))
383
385
        tree = self.make_branch_and_tree('.', format='git')
384
386
        self.build_tree_contents([('a', 'text for a\n')])
385
387
        tree.add(['a'])
386
388
        output, error = self.run_bzr('grep text')
387
389
        self.assertEqual(output, 'a:text for a\n')
388
390
        self.assertEqual(error, '')
 
391
 
 
392
 
 
393
class StatsTests(ExternalBase):
 
394
 
 
395
    def test_simple_stats(self):
 
396
        self.requireFeature(PluginLoadedFeature('stats'))
 
397
        tree = self.make_branch_and_tree('.', format='git')
 
398
        self.build_tree_contents([('a', 'text for a\n')])
 
399
        tree.add(['a'])
 
400
        tree.commit('a commit', committer='Somebody <somebody@example.com>')
 
401
        output, error = self.run_bzr('stats')
 
402
        self.assertEqual(output, '   1 Somebody <somebody@example.com>\n')