File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 8
8
import shutil
9
9
import os
10
10
import stat
11
+ from distutils .version import LooseVersion
11
12
12
13
import pytest
13
14
14
15
mine = (stat .S_IREAD | stat .S_IWRITE )
15
16
other = stat .S_IROTH
16
17
execute = (stat .S_IEXEC | stat .S_IXOTH )
17
18
18
-
19
19
@contextmanager
20
20
def mkdtemp (* args , ** kwargs ):
21
21
temp_dir = tempfile .mkdtemp (* args , ** kwargs )
@@ -78,13 +78,17 @@ def test_insteam_success(self):
78
78
assert self .cd .instream (BytesIO (b"foo" )) == {'stream' : ('OK' , None )}
79
79
80
80
def test_fdscan (self ):
81
+ if LooseVersion (clamd .__version__ ) < LooseVersion ("1.0.3" ):
82
+ return
81
83
with tempfile .NamedTemporaryFile ('wb' , prefix = "python-clamd" ) as f :
82
84
f .write (clamd .EICAR )
83
85
f .flush ()
84
86
expected = {f .name : ('FOUND' , 'Eicar-Test-Signature' )}
85
87
assert self .cd .fdscan (f .name , f .fileno ()) == expected
86
88
87
89
def test_fdscan_success (self ):
90
+ if LooseVersion (clamd .__version__ ) < LooseVersion ("1.0.3" ):
91
+ return
88
92
with tempfile .NamedTemporaryFile ('wb' , prefix = "python-clamd" ) as f :
89
93
f .write (b"foo" )
90
94
f .flush ()
You can’t perform that action at this time.
0 commit comments