Browse Source

removing test and tox exec

main
Julien Iguchi-Cartigny 10 years ago
parent
commit
f0b5a0d2b2
2 changed files with 0 additions and 79 deletions
  1. +0
    -33
      test
  2. +0
    -46
      tox

+ 0
- 33
test View File

@@ -1,33 +0,0 @@
#!/usr/bin/env python
"""
The main purpose of this file is to run tox only with the current existing python interpretors.
"""
import os
import sys
import logging

if __name__ == "__main__":
log = logging.getLogger()

# now we'll detect which python interpretors we have on this machine and run the tests for all of them
#'python2.5':'py25',
known_pys = { 'python2.6':'py26', 'python2.7':'py27' } # ,'python3':'py3', 'python3.2':'py32', 'python4':'py4'}
#known_pys = { 'python2.7':'py27' } # ,'python3':'py3', 'python3.2':'py32', 'python4':'py4'}

detected_pys = set()
for known_py in known_pys:
if os.system("which %s >/dev/null" % known_py) == 0:
detected_pys.add(known_pys[known_py])
#detected_pys.add('docs')

#os.system("python setup.py test")


cmds = ["autopep8 --ignore=E501 -i *.py tendo/*.py demo/*.py",
#"pep8",
"./tox -e %s" % ",".join(detected_pys)]
for cmd in cmds:
if os.system(cmd) != 0:
print("ERROR: Command `%s` failed, testing stopped here." % cmd)
sys.exit(6)


+ 0
- 46
tox View File

@@ -1,46 +0,0 @@
#!/bin/bash
set -e


if which virtualenv >/dev/null; then
echo
else
sudo easy_install "virtualenv>=1.8.4"
if [ $? -ne 0 ]; then
echo "failed to install virtualenv, you'll have to fix this yourself"
exit 1
fi
fi

if [ -z "$VIRTUAL_ENV" ]
then
virtualenv .tox/tox
cd .tox/tox
source bin/activate
#exit 1
fi

if [ -z "$VIRTUAL_ENV" ]
then
echo This script should only be run inside a virtual_env.
exit 1
fi

easy_install "tox>=1.3"
#pip install tox --upgrade -v
# pytest pytest-cov

python setup.py check --restructuredtext --strict

autopep8 -i -r src/*.py

# commented some errors temporarly, TODO: remove them and fix the code
pep8 --max-line-length=180 --ignore=E502,E128,E123,E127,E125 src

tox -v $@

if [ $? -ne 0 ]; then
echo "Error: tox returned error code $?"
else
echo "Done."
fi

Loading…
Cancel
Save