update unit test
This commit is contained in:
parent
3fc543cb7f
commit
8454220adc
2 changed files with 28 additions and 1 deletions
|
@ -13,7 +13,7 @@ before_install:
|
||||||
- sudo tests/socksify/install.sh
|
- sudo tests/socksify/install.sh
|
||||||
script:
|
script:
|
||||||
- pep8 .
|
- pep8 .
|
||||||
- nosetests shadowsocks/*
|
- python tests/nose_plugin.py
|
||||||
- python tests/test.py -c tests/table.json
|
- python tests/test.py -c tests/table.json
|
||||||
- python tests/test.py -c tests/aes.json
|
- python tests/test.py -c tests/aes.json
|
||||||
- python tests/test.py -c tests/aes-ctr.json
|
- python tests/test.py -c tests/aes-ctr.json
|
||||||
|
|
27
tests/nose_plugin.py
Normal file
27
tests/nose_plugin.py
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import sys
|
||||||
|
import nose
|
||||||
|
from nose.plugins.base import Plugin
|
||||||
|
|
||||||
|
class ExtensionPlugin(Plugin):
|
||||||
|
|
||||||
|
name = "ExtensionPlugin"
|
||||||
|
|
||||||
|
def options(self, parser, env):
|
||||||
|
Plugin.options(self,parser,env)
|
||||||
|
|
||||||
|
def configure(self, options, config):
|
||||||
|
Plugin.configure(self, options, config)
|
||||||
|
self.enabled = True
|
||||||
|
|
||||||
|
def wantFile(self, file):
|
||||||
|
return file.endswith('.py')
|
||||||
|
|
||||||
|
def wantDirectory(self,directory):
|
||||||
|
return True
|
||||||
|
|
||||||
|
def wantModule(self,file):
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
nose.main(addplugins=[ExtensionPlugin()])
|
Loading…
Add table
Add a link
Reference in a new issue