/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/tests/features.py

  • Committer: Jelmer Vernooij
  • Date: 2019-05-29 03:28:14 UTC
  • mfrom: (7303 work)
  • mto: This revision was merged to the branch mainline in revision 7305.
  • Revision ID: jelmer@jelmer.uk-20190529032814-fzqbrgf9647u9ptq
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
404
404
testtools = ModuleAvailableFeature('testtools')
405
405
flake8 = ModuleAvailableFeature('flake8.api.legacy')
406
406
 
407
 
compiled_patiencediff_feature = ModuleAvailableFeature(
408
 
    'breezy._patiencediff_c')
409
407
lsprof_feature = ModuleAvailableFeature('breezy.lsprof')
 
408
pkg_resources_feature = ModuleAvailableFeature('pkg_resources')
410
409
 
411
410
 
412
411
class _BackslashDirSeparatorFeature(Feature):
567
566
 
568
567
 
569
568
BackslashFilenameFeature = _BackslashFilenameFeature()
 
569
 
 
570
 
 
571
class PathFeature(Feature):
 
572
    """Feature testing whether a particular path exists."""
 
573
 
 
574
    def __init__(self, path):
 
575
        super(PathFeature, self).__init__()
 
576
        self.path = path
 
577
 
 
578
    def _probe(self):
 
579
        return os.path.exists(self.path)
 
580
 
 
581
    def feature_name(self):
 
582
        return "%s exists" % self.path