Skip to content

Commit 523596a

Browse files
committed
Merge branch 'master' into automark
2 parents e9dc3cf + 5f17430 commit 523596a

File tree

10 files changed

+53
-25
lines changed

10 files changed

+53
-25
lines changed

CHANGES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
+ Issue #13: Do not import pytest in setup.py to make it compatible
4545
with pipenv.
4646

47+
+ Issue #15: tests fail with pytest 3.3.0.
48+
49+
+ Clarify in the documentation that Python 3.1 is not officially
50+
supported because pytest 2.8 does not support it. There is no
51+
known issue with Python 3.1 though.
52+
4753
* Version 0.2 (2017-05-28)
4854

4955
** New features

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ distclean: clean
4141
git describe --always --dirty > .gitrevision
4242

4343
python2_6.patch:
44-
git diff `git merge-base master python2_6` python2_6 > $@
44+
git diff `git merge-base master python2_6` python2_6 \
45+
-- . ':(exclude).travis.yml' > $@
4546

4647

4748
.PHONY: build test sdist doc-html doc-pdf doc-dist clean distclean .gitrevision

README.rst

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ The latest release version can be found at PyPI, see
2020
System requirements
2121
-------------------
2222

23-
+ Python 2.6, 2.7, or 3.1 and newer.
23+
+ Python 2.6, 2.7, or 3.2 and newer.
2424
Python 2.6 requires patching the sources, see below.
2525
+ `setuptools`_.
2626
+ `pytest`_ 2.8.0 or newer.
2727

28+
(Python 3.1 is not supported by pytest 2.8.0 itself.)
29+
2830

2931
Installation
3032
------------
@@ -70,16 +72,6 @@ The example test modules used in the documentation can be found in
7072
doc/examples in the source distribution.
7173

7274

73-
Bugs and limitations
74-
--------------------
75-
76-
+ The test fails with Python 3.1. At first glance, this looks like a
77-
problem between pytest and Python 3.1 rather then an issue in
78-
pytest-dependency. I didn't investigate this in detail, though. In
79-
any case, the module can be installed and the plugin seem to work
80-
fine also with Python 3.1.
81-
82-
8375
Copyright and License
8476
---------------------
8577

doc/src/advanced.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ Consider the following example test module:
1717
.. literalinclude:: ../examples/dyn-parametrized.py
1818

1919
In principle, this example works the very same way as the basic
20-
example for parametrized tests, see :ref:`usage-parametrized`. The
21-
only difference is that the lists of paramters are dynamically
22-
compiled beforehand. The test for child `l` deliberately fails, just
23-
to show the effect. As a consequence, the test for its parent `d`
24-
will be skipped.
20+
example for :ref:`usage-parametrized`. The only difference is that
21+
the lists of paramters are dynamically compiled beforehand. The test
22+
for child `l` deliberately fails, just to show the effect. As a
23+
consequence, the test for its parent `d` will be skipped.
24+
25+
.. _advanced-grouping-fixtures:
2526

2627
Grouping tests using fixtures
2728
-----------------------------

doc/src/configuration.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Configuring pytest-dependency
2+
=============================
3+
4+
This section explains configuration options for pytest-dependency and
5+
also other configuration that is recommended for the use with
6+
pytest-dependency.
7+
8+
Configuration file options
9+
--------------------------
10+
11+
Configuration file options can be set in the `ini file`.
12+
13+
minversion
14+
This is a builtin configuration of pytest itself. Since
15+
pytest-dependency requires pytest 2.8.0 or newer, it is
16+
recommended to set this option accordingly.

doc/src/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ Content of the documentation
1515
install
1616
usage
1717
advanced
18+
configuration
1819
reference

doc/src/install.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Installation instructions
44
System requirements
55
-------------------
66

7-
+ Python 2.6, 2.7, or 3.1 and newer.
7+
+ Python 2.6, 2.7, or 3.2 and newer.
88
Python 2.6 requires patching the sources, see below.
99
+ `setuptools`_.
1010
+ `pytest`_ 2.8.0 or newer.
1111

12+
(Python 3.1 is not supported by pytest 2.8.0 itself.)
13+
1214

1315
Download
1416
--------

doc/src/usage.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,13 @@ Naming tests
4444
Tests are referenced by their name in the `depends` argument. The
4545
default for this name is the node ID defined by pytest, that is the
4646
name of the test function, extended by the parameters if applicable.
47-
As these node IDs may become complicated, the name can be overridden
48-
by an explicit `name` argument to the marker. The following example
49-
works exactly as the last one, only the test names are explicitely
50-
set:
47+
In some cases, it's not easy to predict the names of the node IDs.
48+
For this reason, the name of the tests can be overridden by an
49+
explicit `name` argument to the marker. The following example works
50+
exactly as the last one, only the test names are explicitely set:
5151

5252
.. literalinclude:: ../examples/named.py
5353

54-
.. _usage-parametrized:
55-
5654
Using test classes
5755
------------------
5856

@@ -68,6 +66,8 @@ build from the name of the class and the respective method in this
6866
case, while in `TestClassNamed` these names are overridden by an
6967
explicit name argument to the :func:`pytest.mark.dependency` marker.
7068

69+
.. _usage-parametrized:
70+
7171
Parametrized tests
7272
------------------
7373

@@ -100,3 +100,9 @@ Tests `test_c` and `test_d` set their dependencies at runtime calling
100100
of the `request` pytest fixture, the second argument is the list of
101101
dependencies. It has the same effect as passing this list as the
102102
`depends` argument to the :func:`pytest.mark.dependency` marker.
103+
104+
The present example is certainly somewhat artificial, as the use of
105+
the :func:`pytest_dependency.depends` function would not be needed in
106+
such a simple case. For a more involved example that can not as
107+
easily be formulated with the static the `depends` argument, see
108+
:ref:`advanced-grouping-fixtures`.

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def make_release_tree(self, base_dir, files):
7272
'Programming Language :: Python :: 2.6',
7373
'Programming Language :: Python :: 2.7',
7474
'Programming Language :: Python :: 3',
75-
'Programming Language :: Python :: 3.1',
7675
'Programming Language :: Python :: 3.2',
7776
'Programming Language :: Python :: 3.3',
7877
'Programming Language :: Python :: 3.4',

tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
@pytest.fixture
77
def ctestdir(testdir):
8+
testdir.makefile('.ini', pytest="""
9+
[pytest]
10+
console_output_style = classic
11+
""")
812
testdir.makeconftest("""
913
import sys
1014
if "pytest_dependency" not in sys.modules:

0 commit comments

Comments
 (0)