def single(test): cleanup() venv([ 'python', '-m', 'pytest', '--pdb', '--full-trace', '--maxfail=1', os.path.join('server/tests', test) ]) cleanup()
def server(): cleanup() venv(['PYTHONPATH=./src/:./tests/brython/ python', '-m pytest', '-rw', '--html tests/results/results.html', '--cov=./src/circular', '--ignore=./tests/selenium/', '--ignore=./tests/results/', 'tests']) cleanup()
def single(test): cleanup() venv(['PYTHONPATH=./src/:./tests/brython/ python', '-m pytest', '--pdb', '--full-trace', '--maxfail=1', '--driver PhantomJS', '--ignore=./tests/selenium/webroot/', '--ignore=./tests/results/', os.path.join('tests/circular', test)]) cleanup()
def all(): cleanup() with lcd('tests/selenium/webroot'): local('python -m SimpleHTTPServer 7000 2>/dev/null >/dev/null &') venv(['PYTHONPATH=./src/:./tests/brython/', 'python', '-m pytest', '-rw', '--driver PhantomJS', '--html tests/results/results.html', '--cov=./src/circular', '--ignore=./tests/selenium/webroot/', '--ignore=./tests/results/', 'tests']) cleanup()
def install(package): venv(['pip', 'install', package])
def mkenv(): local("virtualenv -p /usr/bin/python3.4 virtual_env") venv(['pip', 'install', '-r', 'requirements.txt'])
def uninstall(package): venv(['pip', 'uninstall', package])
def freeze(): venv(['pip', 'freeze', '> requirements.txt'])
def list(): venv(['pip', 'list'])
def all(): cleanup() venv(['python', '-m', 'pytest', 'server/tests']) cleanup()
def lint(report=False): args = ['PYTHONPATH=./src/:./tests/brython/ pylint'] if not report: args.append('--reports=n') args.append('circular') venv(args)
def serve(): venv(['python3', 'server.py'])
def build(): venv(['sphinx-build','-b','html', '-D','latex_paper_size=a4', 'docs','www/docs'])
def coverage(): venv(['sphinx-build','-b','coverage', '-D','latex_paper_size=a4', 'docs','www/docs/coverage'])
def all(): cleanup() venv(['PYTHONPATH=./client/python_packages/ python','-m', 'pytest', 'client/tests']) cleanup()
def single(test): cleanup() venv(['PYTHONPATH=./client/python_packages/ python','-m', 'pytest', '--pdb','--full-trace', '--maxfail=1',os.path.join('client/tests',test)]) cleanup()