Added sniffer
This commit is contained in:
parent
d914e7b64d
commit
e0a3468c9e
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*.pyc
|
||||
.ropeproject
|
||||
openstack_neat.egg-info
|
||||
|
4
NOTICE
4
NOTICE
@ -12,6 +12,10 @@ module distributions developed by Tarek Ziadé, released under the
|
||||
Python Software Foundation License, and available from
|
||||
https://bitbucket.org/tarek/distribute
|
||||
|
||||
This software uses sniffer, a Python auto-testing tool developed by
|
||||
Jeff Hui, released under the MIT License, and available from
|
||||
https://github.com/jeffh/sniffer
|
||||
|
||||
This software uses pyqcy, a QuickCheck-like testing framework for
|
||||
Python developed by Karol Kuczmarski, released under the FreeBSD
|
||||
License, and available from https://github.com/Xion/pyqcy
|
||||
|
28
scent.py
Normal file
28
scent.py
Normal file
@ -0,0 +1,28 @@
|
||||
from sniffer.api import *
|
||||
from subprocess import call
|
||||
import os
|
||||
|
||||
|
||||
# This gets invoked on every file that gets changed in the directory. Return
|
||||
# True to invoke any runnable functions, False otherwise.
|
||||
#
|
||||
# This fires runnables only if files ending with .py extension and not prefixed
|
||||
# with a period.
|
||||
@file_validator
|
||||
def py_files(filename):
|
||||
return filename.endswith('.py') and \
|
||||
not filename.endswith('flymake.py') and \
|
||||
not os.path.basename(filename).startswith('.')
|
||||
|
||||
|
||||
# This gets invoked for verification. This is ideal for running tests of some sort.
|
||||
# For anything you want to get constantly reloaded, do an import in the function.
|
||||
#
|
||||
# sys.argv[0] and any arguments passed via -x prefix will be sent to this function as
|
||||
# it's arguments. The function should return logically True if the validation passed
|
||||
# and logicially False if it fails.
|
||||
#
|
||||
# This example simply runs nose.
|
||||
@runnable
|
||||
def execute_tests(*args):
|
||||
return not call(['python2', 'setup.py', '-q', 'test'])
|
Loading…
x
Reference in New Issue
Block a user