mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-08-17 00:20:42 +03:00
Support ./setup.py test, add tests for python 3.6
This commit is contained in:
parent
210b73820d
commit
87097b7aed
@ -9,3 +9,4 @@ exclude_lines =
|
||||
omit =
|
||||
weasyprint/tests/test_web/*
|
||||
weasyprint/tests/w3_test_suite/*
|
||||
.*
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
||||
|
||||
# Building and Distributing
|
||||
/*.egg-info
|
||||
/.eggs
|
||||
/build
|
||||
/dist
|
||||
/docs/_build
|
||||
|
@ -11,6 +11,8 @@ matrix:
|
||||
python: 3.4
|
||||
- os: linux
|
||||
python: 3.5
|
||||
- os: linux
|
||||
python: 3.6
|
||||
- os: osx
|
||||
language: generic
|
||||
env: PYTHON_VERSION=3
|
||||
@ -32,9 +34,7 @@ before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python3 cairo pango gdk-pixbuf libxml2 libxslt libffi; fi
|
||||
|
||||
install:
|
||||
- pip$PYTHON_VERSION install --upgrade setuptools pytest flake8
|
||||
- pip$PYTHON_VERSION install -e .
|
||||
- pip$PYTHON_VERSION install --upgrade -e.[test]
|
||||
|
||||
script:
|
||||
- python$PYTHON_VERSION -m pytest -s
|
||||
- python$PYTHON_VERSION -m flake8 weasyprint
|
||||
- python$PYTHON_VERSION setup.py test
|
||||
|
@ -1,3 +0,0 @@
|
||||
[pytest]
|
||||
norecursedirs=.git .tox venv env
|
||||
addopts=--tb=short
|
@ -2,5 +2,9 @@
|
||||
source-dir = docs
|
||||
build-dir = docs/_build
|
||||
|
||||
[flake8]
|
||||
exclude = docs,.git,.tox
|
||||
[aliases]
|
||||
test = pytest
|
||||
|
||||
[tool:pytest]
|
||||
addopts = --cov
|
||||
norecursedirs = dist .cache .git build *.egg-info .eggs venv
|
||||
|
13
setup.py
Normal file → Executable file
13
setup.py
Normal file → Executable file
@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
WeasyPrint
|
||||
==========
|
||||
@ -41,6 +43,10 @@ if sys.version_info < (3,):
|
||||
else:
|
||||
REQUIREMENTS.append('CairoSVG >= 1.0.20')
|
||||
|
||||
|
||||
needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
|
||||
pytest_runner = ['pytest-runner'] if needs_pytest else []
|
||||
|
||||
setup(
|
||||
name='WeasyPrint',
|
||||
version=VERSION,
|
||||
@ -60,6 +66,7 @@ setup(
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Topic :: Internet :: WWW/HTTP',
|
||||
'Topic :: Text Processing :: Markup :: HTML',
|
||||
'Topic :: Multimedia :: Graphics :: Graphics Conversion',
|
||||
@ -67,12 +74,16 @@ setup(
|
||||
],
|
||||
packages=find_packages(),
|
||||
package_data={
|
||||
'weasyprint.hyphenation': ['*.dic'],
|
||||
'weasyprint.tests': ['resources/*.*', 'resources/*/*'],
|
||||
'weasyprint.css': ['*.css']},
|
||||
zip_safe=False,
|
||||
install_requires=REQUIREMENTS,
|
||||
setup_requires=pytest_runner,
|
||||
test_suite='weasyprint.tests',
|
||||
tests_require=[
|
||||
"pytest-runner", "pytest-cov", "pytest-flake8", "pytest-isort"],
|
||||
extras_require={"test": [
|
||||
"pytest-runner", "pytest-cov", "pytest-flake8", "pytest-isort"]},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'weasyprint = weasyprint.__main__:main',
|
||||
|
Loading…
Reference in New Issue
Block a user