Merge lp:~jelmer/brz/pyinotify-feature into lp:brz/3.1

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/pyinotify-feature
Merge into: lp:brz/3.1
Diff against target: 36 lines (+8/-0)
2 files modified
breezy/tests/features.py (+2/-0)
breezy/tests/test_workspace.py (+6/-0)
To merge this branch: bzr merge lp:~jelmer/brz/pyinotify-feature
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+388850@code.launchpad.net

Commit message

Skip pyinotify tests if pyinotify is missing.

Description of the change

Skip pyinotify tests if pyinotify is missing.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/tests/features.py'
2--- breezy/tests/features.py 2019-05-28 21:46:09 +0000
3+++ breezy/tests/features.py 2020-08-06 22:03:18 +0000
4@@ -407,6 +407,8 @@
5 lsprof_feature = ModuleAvailableFeature('breezy.lsprof')
6 pkg_resources_feature = ModuleAvailableFeature('pkg_resources')
7
8+pyinotify = ModuleAvailableFeature('pyinotify')
9+
10
11 class _BackslashDirSeparatorFeature(Feature):
12
13
14=== modified file 'breezy/tests/test_workspace.py'
15--- breezy/tests/test_workspace.py 2020-07-27 22:32:15 +0000
16+++ breezy/tests/test_workspace.py 2020-08-06 22:03:18 +0000
17@@ -19,6 +19,7 @@
18 from . import (
19 TestCaseWithTransport,
20 multiply_scenarios,
21+ features,
22 )
23 from .scenarios import load_tests_apply_scenarios
24
25@@ -117,6 +118,11 @@
26 vary_by_format(),
27 )
28
29+ def setUp(self):
30+ super(WorkspaceTests, self).setUp()
31+ if self._use_inotify:
32+ self.requireFeature(features.pyinotify)
33+
34 def test_root_add(self):
35 tree = self.make_branch_and_tree('.', format=self._format)
36 with Workspace(tree, use_inotify=self._use_inotify) as ws:

Subscribers

People subscribed via source and target branches