Skip to content

Commit 0b16bba

Browse files
committed
Merge remote-tracking branch 'upstream/master' into RazerM/master
2 parents 17cadc1 + 6c27516 commit 0b16bba

File tree

11 files changed

+87
-101
lines changed

11 files changed

+87
-101
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ htmlcov/
1717
.tox/
1818
.coverage
1919
.coverage.*
20-
.cache
20+
.pytest_cache/
21+
.eggs/
2122
coverage.xml
2223
tests/junit.xml
24+
25+
pytest_flask/_version.py

.travis.yml

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,48 @@
11
language: python
22

3-
branches:
4-
except:
5-
- gh-pages
6-
7-
cache:
8-
directories:
9-
- "${HOME}/virtualenv"
10-
- "${TRAVIS_BUILD_DIR}/.tox"
11-
123
python:
13-
- 2.6
14-
- 2.7
15-
- 3.3
16-
- 3.4
17-
- 3.5
18-
- 3.6
19-
- pypy
4+
- "3.6"
5+
6+
stages:
7+
- test
8+
- name: deploy
9+
if: repo = pytest-dev/pytest-flask AND tag IS present
10+
11+
jobs:
12+
include:
13+
- env: TOXENV=py27
14+
python: '2.7'
15+
- env: TOXENV=py34
16+
python: '3.4'
17+
- env: TOXENV=py35
18+
python: '3.5'
19+
- env: TOXENV=py36
20+
python: '3.6'
21+
- env: TOXENV=py37
22+
python: '3.7'
23+
sudo: required
24+
dist: xenial
2025

21-
matrix:
22-
fast_finish: true
23-
allow_failures:
24-
- python: 3.6
25-
- python: 3.5
26+
- stage: deploy
27+
python: '3.6'
28+
env:
29+
install: pip install -U setuptools setuptools_scm
30+
script: skip
31+
deploy:
32+
provider: pypi
33+
user: nicoddemus
34+
distributions: sdist bdist_wheel
35+
skip_upload_docs: true
36+
password:
37+
secure: lSaCqdifJoDS7qjpAnGgfrvuACEEBBQYDsjtkNlkktIhrZNJi0OjNWNuHN8uDpQSULiOdiQv/bOCAk288Pao341nHznMP3Cu9o+Zgi96dESAwTHx7w+01uzj+nzuRieeYL+Ye9VK0W3A7yu8tTG2GAhuqKCv0bDV7fUKAfySSI+SKTudLt4DHAYLd02tpbmPoHcHRqUSKTtkJKYUaYGM9QGk8p4+2ap006nqiykhiplnAWNLu+xzby7TaFYpA3Yy4x6XWMcdOoTaaBzQHZaGVayT1zR1BfmcOovlIb8sOUQVr6PV/dxC29VTRuyY85S2Rdyw/2Y4viTO5c1omEU/pVzy4RNi4RWboh58WA0kjrwOmb/nLW8AcXNJG9H828dqy8KKdbblTU5guz1oO1Tb2ICLT2z4hQOcZoDkCg3jf54Ee4BYvLOvMH/kNOjNqLA7wjBUzvyWk5OPOIPZ0rozmRwU89VS2kxIhbvtAq0BtmLnIYY3nT5BIrt18FomiINxlgZj6jz2uWGaOPAhcghdjydbGdYs5g2JcUc1B3jvXSyjB+o1l/EJ9OUwCQWIc32XWvOtx/a7pcyrejbKBqQqi5nKF1bvYDM+8VSLEeLTIX1Ie8hModxWp8WPIk+dHBdy8Kb91c4ssOvEkfwHK7cYBdbcn6O0yhiLOxuOO/3Cb3c=
38+
on:
39+
tags: true
40+
repo: pytest-dev/pytest-flask
2641

2742
install:
28-
- pip install tox
29-
- pip install tox-travis
43+
- pip install -U pip
44+
- pip install -U tox setuptools
3045

3146
script:
3247
- tox
33-
- "find ${TRAVIS_BUILD_DIR}/.tox -name log -o -name __pycache__ -type d | xargs -I {} rm -rf {}"
3448

HOWTORELEASE.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Here are the steps on how to make a new release.
2+
3+
1. Create a ``release-VERSION`` branch from ``upstream/master``.
4+
2. Update ``docs/changelog.rst``.
5+
3. Push a branch with the changes.
6+
4. Once all builds pass, push a tag to ``upstream``.
7+
5. Merge the PR.

MANIFEST.in

Lines changed: 0 additions & 8 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pytest-flask
22
============
33

4-
|PyPI version| |PyPI downloads| |Documentation status|
4+
|PyPI version| |conda-forge version| |Python versions| |Documentation status|
55

66
An extension of `pytest <http://pytest.org/>`__ test runner which
77
provides a set of useful tools to simplify testing and development
@@ -14,7 +14,9 @@ the `PyPI <https://pypi.python.org/pypi/pytest-flask>`__ overview page or
1414
How to start?
1515
-------------
1616

17-
Define your application fixture in ``conftest.py``::
17+
Define your application fixture in ``conftest.py``:
18+
19+
.. code-block:: python
1820
1921
from myapp import create_app
2022
@@ -38,8 +40,12 @@ suggestion.
3840
:target: https://pypi.python.org/pypi/pytest-flask
3941
:alt: PyPi version
4042

41-
.. |PyPI downloads| image:: https://img.shields.io/pypi/dm/pytest-flask.svg
42-
:target: https://pypi.python.org/pypi/pytest-flask
43+
.. |conda-forge version| image:: https://img.shields.io/conda/vn/conda-forge/pytest-flask.svg
44+
:target: https://anaconda.org/conda-forge/pytest-flask
45+
:alt: conda-forge version
46+
47+
.. |Python versions| image:: https://img.shields.io/pypi/pyversions/pytest-flask.svg
48+
:target: https://pypi.org/project/pytest-flask
4349
:alt: PyPi downloads
4450

4551
.. |Documentation status| image:: https://readthedocs.org/projects/pytest-flask/badge/?version=latest

docs/changelog.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
Changelog
44
=========
55

6-
Upcoming release
7-
-----------------
6+
0.11.0 (compared to 0.10.0)
7+
---------------------------
8+
9+
- Implement deployment using Travis, following in line with many other pytest plugins.
810

911
- Allow live server to handle concurrent requests (`#56`_), thanks to
1012
`@mattwbarry`_ for the PR.

pytest_flask/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4-
__version__ = "0.10.0"
4+
from ._version import version as __version__

setup.py

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pytest-flask
55
============
66
7-
A set of `pytest <http://pytest.org>`_ fixtures to test Flask
7+
A set of `pytest <https://docs.pytest.org>`_ fixtures to test Flask
88
extensions and applications.
99
1010
Features
@@ -117,16 +117,6 @@ def read(*parts):
117117
return ''
118118

119119

120-
def get_version():
121-
version_file = read('pytest_flask', '__init__.py')
122-
version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]',
123-
version_file, re.MULTILINE)
124-
if version_match:
125-
return version_match.group(1)
126-
raise RuntimeError('Unable to find version string.')
127-
128-
129-
version = get_version()
130120
requirements = read('requirements', 'main.txt').splitlines() + ['pytest']
131121
tests_require = []
132122

@@ -139,16 +129,19 @@ def get_version():
139129
setup(
140130
name='pytest-flask',
141131

142-
# Versions should comply with PEP440. For a discussion on single-sourcing
143-
# the version across setup.py and the project code, see
144-
# http://packaging.python.org/en/latest/tutorial.html#version
145-
version=version,
132+
# Versions should comply with PEP440, and automatically obtained from tags
133+
# thanks to setuptools_scm
134+
use_scm_version={"write_to": "pytest_flask/_version.py"},
135+
setup_requires=["setuptools-scm"],
146136

147137
author='Vital Kudzelka',
148138
author_email='[email protected]',
149139

150140
url='https://github.com/vitalk/pytest-flask',
151-
download_url='https://github.com/vitalk/pytest-flask/tarball/%s' % version,
141+
project_urls={
142+
"Source": "https://github.com/pytest-dev/pytest-flask",
143+
"Tracker": "https://github.com/pytest-dev/pytest-flask/issues",
144+
},
152145
description='A set of py.test fixtures to test Flask applications.',
153146
long_description=__doc__,
154147
license='MIT',
@@ -173,7 +166,10 @@ def get_version():
173166
'Programming Language :: Python :: 2',
174167
'Programming Language :: Python :: 2.7',
175168
'Programming Language :: Python :: 3',
176-
'Programming Language :: Python :: 3.3',
169+
'Programming Language :: Python :: 3.4',
170+
'Programming Language :: Python :: 3.5',
171+
'Programming Language :: Python :: 3.6',
172+
'Programming Language :: Python :: 3.7',
177173
'Topic :: Software Development :: Testing',
178174
'Topic :: Software Development :: Libraries :: Python Modules',
179175
],

tests/test_live_server.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3+
import os
4+
35
import pytest
46
try:
57
from urllib2 import urlopen
@@ -9,6 +11,9 @@
911
from flask import url_for
1012

1113

14+
pytestmark = pytest.mark.skipif(not hasattr(os, 'fork'), reason='needs fork')
15+
16+
1217
class TestLiveServer:
1318

1419
def test_server_is_alive(self, live_server):

0 commit comments

Comments
 (0)