mirror of https://github.com/CIRCL/PyCIRCLean
Setting up pytest
parent
496aa479bd
commit
b450abbaaa
|
@ -1,2 +1,3 @@
|
||||||
twiggy
|
twiggy
|
||||||
python-magic
|
python-magic
|
||||||
|
pytest
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
import kittengroomer as kg
|
||||||
|
from kittengroomer import FileBase
|
||||||
|
import PyCIRCLean.bin.specific as specific
|
||||||
|
|
||||||
|
PATH = os.getcwd() + '/tests/'
|
||||||
|
|
||||||
|
|
||||||
|
def test_base():
|
||||||
|
assert kg.FileBase
|
||||||
|
assert kg.KittenGroomerBase
|
||||||
|
assert kg.main
|
||||||
|
|
||||||
|
|
||||||
|
def test_specific():
|
||||||
|
src = os.path.join(PATH, 'src2')
|
||||||
|
dst = os.path.join(PATH, 'dst')
|
||||||
|
spec = specific.KittenGroomerSpec(src, dst, debug=True)
|
||||||
|
spec.processdir()
|
||||||
|
|
||||||
|
|
||||||
|
def test_help_file():
|
||||||
|
f = FileBase('tests/src/blah.conf', 'tests/dst/blah.conf')
|
||||||
|
f.make_unknown()
|
||||||
|
f.make_binary()
|
||||||
|
f.make_unknown()
|
||||||
|
f.make_dangerous()
|
||||||
|
f.make_binary()
|
||||||
|
f.make_dangerous()
|
Loading…
Reference in New Issue