|
@@ -0,0 +1,42 @@
|
|
|
|
|
+
|
|
|
|
|
+# Tester, contrôler, et déployer son code python en intégration continue
|
|
|
|
|
+
|
|
|
|
|
+> Testé avec python 3.4, et python 3.6
|
|
|
|
|
+
|
|
|
|
|
+## Pré-requis:
|
|
|
|
|
+
|
|
|
|
|
+Installer les librairies suivantes sur la machine de test:
|
|
|
|
|
+
|
|
|
|
|
+Requis:
|
|
|
|
|
+
|
|
|
|
|
+* nose2 > `pip install nose2`
|
|
|
|
|
+* cov-core > `pip install cov-core`
|
|
|
|
|
+
|
|
|
|
|
+* pylint > `pip install pylint` (préinstallé en 3.6)
|
|
|
|
|
+> si ImportError au lancement de pylint, executer aussi:
|
|
|
|
|
+> `pip install wrapt lazy_object_proxy --upgrade`
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+Autres:
|
|
|
|
|
+* junit-xml > `pip install junit-xml`
|
|
|
|
|
+
|
|
|
|
|
+## nose2 - Tests unitaires et couverture
|
|
|
|
|
+
|
|
|
|
|
+[**nose2**](https://nose2.readthedocs.io/en/latest/) executera les tests de tous les fichiers dont le nom commence par 'test_'
|
|
|
|
|
+
|
|
|
|
|
+En ligne de commande windows: `nose2 --with-coverage --coverage=<module>`
|
|
|
|
|
+
|
|
|
|
|
+Pour générer des rapports en html:
|
|
|
|
|
+`nose2 --with-coverage --coverage=<module> --coverage-report html`
|
|
|
|
|
+
|
|
|
|
|
+## PyLint - Qualité du code
|
|
|
|
|
+
|
|
|
|
|
+[**pylint**](https://www.pylint.org/) contrôle la qualité du code
|
|
|
|
|
+
|
|
|
|
|
+En ligne de commande windows: `pylint <module>`
|
|
|
|
|
+
|
|
|
|
|
+## Distribuer
|
|
|
|
|
+
|
|
|
|
|
+* [pynsist](https://pypi.python.org/pypi/pynsist)
|
|
|
|
|
+* [py2exe](http://py2exe.org/)
|
|
|
|
|
+* [cx_Freeze](https://pypi.python.org/pypi/cx_Freeze)
|