mirror of https://github.com/CIRCL/PyCIRCLean
Add new file to travis
parent
8ee3f807b1
commit
d1f1c4fe16
|
@ -31,6 +31,8 @@ install:
|
|||
- pip install python-magic
|
||||
- pip install coveralls
|
||||
- pip install codecov
|
||||
- pip install officedissector
|
||||
- if [ $(python -c 'import sys; print(sys.version_info.major)') == '2' ]; then pip install oletools olefile ; fi
|
||||
- python setup.py -q install
|
||||
|
||||
script:
|
||||
|
|
|
@ -86,7 +86,7 @@ class File(FileBase):
|
|||
pass
|
||||
|
||||
|
||||
class KittenGroomer(KittenGroomerBase):
|
||||
class KittenGroomerFileCheck(KittenGroomerBase):
|
||||
|
||||
def __init__(self, root_src=None, root_dst=None, max_recursive=5):
|
||||
'''
|
||||
|
@ -96,7 +96,7 @@ class KittenGroomer(KittenGroomerBase):
|
|||
root_src = os.path.join(os.sep, 'media', 'src')
|
||||
if root_dst is None:
|
||||
root_dst = os.path.join(os.sep, 'media', 'dst')
|
||||
super(KittenGroomer, self).__init__(root_src, root_dst)
|
||||
super(KittenGroomerFileCheck, self).__init__(root_src, root_dst)
|
||||
|
||||
self.recursive = 0
|
||||
self.max_recursive = max_recursive
|
||||
|
@ -409,4 +409,4 @@ class KittenGroomer(KittenGroomerBase):
|
|||
self._print_log()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(KittenGroomer, 'Generic version of the KittenGroomer. Convert and rename files.')
|
||||
main(KittenGroomerFileCheck, 'Generic version of the KittenGroomer. Convert and rename files.')
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
|
||||
import unittest
|
||||
import os
|
||||
import sys
|
||||
|
||||
from bin.specific import KittenGroomerSpec
|
||||
from bin.pier9 import KittenGroomerPier9
|
||||
from bin.generic import KittenGroomer
|
||||
from bin.filecheck import KittenGroomerFileCheck
|
||||
|
||||
from kittengroomer import FileBase
|
||||
|
||||
|
@ -41,6 +43,14 @@ class TestBasic(unittest.TestCase):
|
|||
spec = KittenGroomer(src, dst)
|
||||
spec.processdir()
|
||||
|
||||
def test_filecheck(self):
|
||||
if sys.version_info.major >= 3:
|
||||
return
|
||||
src = os.path.join(self.curpath, 'tests/src')
|
||||
dst = os.path.join(self.curpath, 'tests/dst')
|
||||
spec = KittenGroomerFileCheck(src, dst)
|
||||
spec.processdir()
|
||||
|
||||
def test_help_file(self):
|
||||
f = FileBase('tests/src/blah.conf', 'tests/dst/blah.conf')
|
||||
f.make_unknown()
|
||||
|
|
Loading…
Reference in New Issue