6
6
from tinydb import TinyDB , Query
7
7
from subprocess import CalledProcessError
8
8
9
- from heudiconv .cli .monitor import monitor , process , run_heudiconv , MASK_NEWDIR
9
+ try :
10
+ from heudiconv .cli .monitor import (monitor , process , run_heudiconv ,
11
+ MASK_NEWDIR )
12
+
13
+ Header = namedtuple ('header' , ['wd' , 'mask' , 'cookie' , 'len' ])
14
+ header = Header (5 , MASK_NEWDIR , 5 , 5 )
15
+ watch_path = b'WATCHME'
16
+ filename = b'FILE'
17
+ type_names = b'TYPE'
18
+
19
+ path2 = watch_path + b'/' + filename + b'/subpath'
20
+
21
+ my_events = [(header , type_names , watch_path , filename ),
22
+ (header , type_names , path2 , b'' )]
23
+ except AttributeError :
24
+ my_events = []
25
+ pytestmark = pytest .mark .skip (reason = 'TODO' )
10
26
11
27
12
28
class MockInotifyTree (object ):
@@ -26,16 +42,6 @@ def __call__(self):
26
42
return self .time
27
43
28
44
29
- Header = namedtuple ('header' , ['wd' , 'mask' , 'cookie' , 'len' ])
30
- header = Header (5 , MASK_NEWDIR , 5 , 5 )
31
- watch_path = b'WATCHME'
32
- filename = b'FILE'
33
- type_names = b'TYPE'
34
-
35
- path2 = watch_path + b'/' + filename + b'/subpath'
36
-
37
- my_events = [(header , type_names , watch_path , filename ),
38
- (header , type_names , path2 , b'' )]
39
45
40
46
@pytest .mark .skip (reason = "TODO" )
41
47
@patch ('inotify.adapters.InotifyTree' , MockInotifyTree (my_events ))
0 commit comments