# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1436516533 -7200
#      Fri Jul 10 10:22:13 2015 +0200
# Node ID 7efdcb03d90b62c0bddc0f8d4e572169e4a6fd6a
# Parent  4d3baee0020b8f481addf6e0905cd324f76cdd7e
Add tox configuration and make the code PEP8 compliant

diff --git a/.hgignore b/.hgignore
new file mode 100644
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,2 @@
+^.tox$
+\.egg-info$
diff --git a/migration/postcreate.py b/migration/postcreate.py
--- a/migration/postcreate.py
+++ b/migration/postcreate.py
@@ -19,7 +19,3 @@
 
 You could setup site properties or a workflow here for example.
 """
-
-# Example of site property change
-#set_property('ui.site-title', "<sitename>")
-
diff --git a/test/pytestconf.py b/test/pytestconf.py
--- a/test/pytestconf.py
+++ b/test/pytestconf.py
@@ -23,6 +23,7 @@
 
 from logilab.common.pytest import PyTester
 
+
 def getlogin():
     """avoid usinng os.getlogin() because of strange tty / stdin problems
     (man 3 getlogin)
diff --git a/test/test_compound.py b/test/test_compound.py
--- a/test/test_compound.py
+++ b/test/test_compound.py
@@ -39,6 +39,7 @@
 
 from cubicweb.devtools import testlib
 
+
 class DefaultTC(testlib.CubicWebTC):
     def test_something(self):
         self.skipTest('this cube has no test')
diff --git a/tox.ini b/tox.ini
new file mode 100644
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,20 @@
+[tox]
+env = py27,pep8
+
+[testenv]
+sitepackages = True
+
+[testenv:test]
+whitelist_externals =
+  pytest
+setenv =
+  CW_CUBES_PATH={envdir}/share/cubicweb/cubes
+commands = pytest -t {toxinidir}/test {posargs}
+
+[testenv:pep8]
+whitelist_externals =
+  pep8
+deps =
+  pep8
+commands =
+  pep8 {toxinidir} --max-line-length=100 --exclude=__pkginfo__.py,setup.py,.tox