mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Arrange packaging, Tox and pytest configuration
This commit is contained in:
parent
b78a7ca584
commit
9d1e2c511c
3 changed files with 39 additions and 3 deletions
6
pytest.ini
Normal file
6
pytest.ini
Normal file
|
@ -0,0 +1,6 @@
|
|||
[pytest]
|
||||
addopts = --cov=moulinette -s -v --no-cov-on-fail
|
||||
norecursedirs = dist doc build .tox .eggs
|
||||
testpaths = test/
|
||||
env =
|
||||
MOULINETTE_LOCALES_DIR = {PWD}/locales
|
19
setup.py
19
setup.py
|
@ -1,12 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from distutils.core import setup
|
||||
|
||||
from moulinette.globals import LOCALES_DIR
|
||||
|
||||
|
||||
# Extend installation
|
||||
locale_files = []
|
||||
|
||||
|
@ -31,5 +30,19 @@ setup(name='Moulinette',
|
|||
'moulinette.utils',
|
||||
],
|
||||
data_files=[(LOCALES_DIR, locale_files)],
|
||||
tests_require=["pytest", "webtest"],
|
||||
python_requires='==2.7.*',
|
||||
install_requires=[
|
||||
'argcomplete',
|
||||
'psutil',
|
||||
'pytz',
|
||||
'pyyaml',
|
||||
],
|
||||
tests_require=[
|
||||
'pytest',
|
||||
'pytest-cov',
|
||||
'pytest-env',
|
||||
'pytest-mock',
|
||||
'requests',
|
||||
'requests-mock',
|
||||
],
|
||||
)
|
||||
|
|
17
tox.ini
Normal file
17
tox.ini
Normal file
|
@ -0,0 +1,17 @@
|
|||
[tox]
|
||||
envlist = py27
|
||||
skipdist = True
|
||||
isolated_build = True
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
passenv = *
|
||||
deps =
|
||||
pytest >= 4.6.3, < 5.0
|
||||
pytest-cov >= 2.7.1, < 3.0
|
||||
pytest-mock >= 1.10.4, < 2.0
|
||||
pytest-env >= 0.6.2, < 1.0
|
||||
requests >= 2.22.0, < 3.0
|
||||
requests-mock >= 1.6.0, < 2.0
|
||||
commands =
|
||||
pytest {posargs}
|
Loading…
Reference in a new issue