Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d9d6c6a34 | ||
|
|
1542aff326 | ||
|
|
cc95cf26e1 | ||
|
|
eb90a7c82c | ||
|
|
afe8bad9ff | ||
|
|
95a62460aa | ||
|
|
8e2fdeee3e | ||
|
|
fae1e02c1d | ||
|
|
3440f08a40 | ||
|
|
a9b064d992 | ||
|
|
47875cbea9 |
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
17
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
Thanks for submitting a PR, your contribution is really appreciated!
|
||||
|
||||
Here's a quick checklist that should be present in PRs:
|
||||
|
||||
- [ ] Make sure to include reasonable tests for your change if necessary
|
||||
|
||||
- [ ] Add a new news fragment into the changelog folder, following these guidelines:
|
||||
* Name it `$issue_id.$type` for example `588.bug`
|
||||
* If you don't have an issue_id change it to the PR id after creating it
|
||||
* Ensure type is one of `removal`, `feature`, `bugfix`, `vendor`, `doc` or `trivial`
|
||||
* Make sure to use full sentences with correct case and punctuation, for example:
|
||||
|
||||
```
|
||||
Fix issue with non-ascii contents in doctest text files.
|
||||
```
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ notifications:
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: ronny
|
||||
skip_upload_docs: true
|
||||
password:
|
||||
secure: cxmSDho5d+PYKEM4ZCg8ms1P4lzhYkrw6fEOm2HtTcsuCyY6aZMSgImWAnEYbJHSkdzgcxlXK9UKJ9B0YenXmBCkAr7UjdnpNXNmkySr0sYzlH/sfqt/dDATCHFaRKxnkOSOVywaDYhT9n8YudbXI77pXwD12i/CeSSJDbHhsu0JYUfAcb+D6YjRYoA2SEGCnzSzg+gDDfwXZx4ZiODCGLVwieNp1klCg88YROUE1BaYYNuUOONvfXX8+TWowbCF6ChH1WL/bZ49OStEYQNuYxZQZr4yClIqu9VJbchrU8j860K9ott2kkGTgfB/dDrQB/XncBubyIX9ikzCQAmmBXWAI3eyvWLPDk2Jz7kW2l2RT7syct80tCq3JhvQ1qdwr5ap7siocTLgnBW0tF4tkHSTFN3510fkc43npnp6FThebESQpnI24vqpwJ9hI/kW5mYi014Og2E/cpCXnz2XO8iZPDbqAMQpDsqEQoyhfGNgPTGp4K30TxRtwZBI5hHhDKnnR16fXtRgt1gYPvz/peUQvvpOm4JzIzGXPzluuutpnCBy75v5+oiwT3YRrLL/Meims9FtDDXL3qQubAE/ezIOOpm0N5XXV8DxIom8EN71yq5ab1tqhM+tBX7owRjy4FR4If2Q8feBdmTuh26DIQt/y+qSG8VkB9Sw/JCjc7c=
|
||||
on:
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
pytest-xdist 1.17.1 (2017-06-10)
|
||||
================================
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
- Hot fix release reverting the change introduced by #124, unfortunately it
|
||||
broke a number of test suites so we are reversing this change while we
|
||||
investigate the problem. (#157)
|
||||
|
||||
|
||||
Improved Documentation
|
||||
----------------------
|
||||
|
||||
- Introduced ``towncrier`` for ``CHANGELOG`` management. (#154)
|
||||
|
||||
- Added ``HOWTORELEASE`` documentation. (#155)
|
||||
|
||||
|
||||
..
|
||||
You should *NOT* be adding new change log entries to this file, this
|
||||
file is managed by towncrier. You *may* edit previous change logs to
|
||||
fix problems like typo corrections or such.
|
||||
To add a new change log entry, please see
|
||||
https://pip.pypa.io/en/latest/development/#adding-a-news-entry
|
||||
We named the news folder ``changelog``
|
||||
|
||||
.. towncrier release notes start
|
||||
|
||||
|
||||
1.17.0
|
||||
------
|
||||
|
||||
45
HOWTORELEASE.rst
Normal file
45
HOWTORELEASE.rst
Normal file
@@ -0,0 +1,45 @@
|
||||
======================
|
||||
Releasing pytest-xdist
|
||||
======================
|
||||
|
||||
This document describes the steps to make a new ``pytest-xdist`` release.
|
||||
|
||||
Version
|
||||
-------
|
||||
|
||||
``master`` should always be green and a potential release candidate. ``pytest-xdist`` follows
|
||||
semantic versioning, so given that the current version is ``X.Y.Z``, to find the next version number
|
||||
one needs to look at the ``changelog`` folder:
|
||||
|
||||
- If there is any file named ``*.feature``, then we must make a new **minor** release: next
|
||||
release will be ``X.Y+1.0``.
|
||||
|
||||
- Otherwise it is just a **bug fix** release: ``X.Y.Z+1``.
|
||||
|
||||
|
||||
Steps
|
||||
-----
|
||||
|
||||
To publish a new release ``X.Y.Z``, the steps are as follows:
|
||||
|
||||
#. Create a new branch named ``release-X.Y.Z`` from the latest ``master``.
|
||||
|
||||
#. Install ``pytest-xdist`` and dev requirements in a virtualenv::
|
||||
|
||||
$ pip install -e . -r dev-requirements.txt
|
||||
|
||||
#. Update ``CHANGELOG.rst`` file by running::
|
||||
|
||||
$ towncrier --version X.Y.Z
|
||||
|
||||
It might ask for confirmation to remove news fragments; answer yes.
|
||||
|
||||
#. Commit and push the branch for review.
|
||||
|
||||
#. Once PR is **green** and **approved**, create and push a tag::
|
||||
|
||||
$ export VERSION=X.Y.Z
|
||||
$ git tag v$VERSION release-$VERSION
|
||||
$ git push git@github.com:pytest-dev/pytest-xdist.git v$VERSION
|
||||
|
||||
That will build the package and publish it on ``PyPI`` automatically.
|
||||
39
changelog/_template.rst
Normal file
39
changelog/_template.rst
Normal file
@@ -0,0 +1,39 @@
|
||||
{% for section in sections %}
|
||||
{% set underline = "-" %}
|
||||
{% if section %}
|
||||
{{section}}
|
||||
{{ underline * section|length }}{% set underline = "~" %}
|
||||
|
||||
{% endif %}
|
||||
{% if sections[section] %}
|
||||
{% for category, val in definitions.items() if category in sections[section] and category != 'trivial' %}
|
||||
|
||||
{{ definitions[category]['name'] }}
|
||||
{{ underline * definitions[category]['name']|length }}
|
||||
|
||||
{% if definitions[category]['showcontent'] %}
|
||||
{% for text, values in sections[section][category]|dictsort(by='value') %}
|
||||
- {{ text }}{% if category != 'vendor' %} ({{ values|sort|join(', ') }}){% endif %}
|
||||
|
||||
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
- {{ sections[section][category]['']|sort|join(', ') }}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if sections[section][category]|length == 0 %}
|
||||
|
||||
No significant changes.
|
||||
|
||||
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
||||
No significant changes.
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
1
dev-requirements.txt
Normal file
1
dev-requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
towncrier
|
||||
36
pyproject.toml
Normal file
36
pyproject.toml
Normal file
@@ -0,0 +1,36 @@
|
||||
[tool.towncrier]
|
||||
package = "xdist"
|
||||
filename = "CHANGELOG.rst"
|
||||
directory = "changelog/"
|
||||
title_format = "pytest-xdist {version} ({project_date})"
|
||||
template = "changelog/_template.rst"
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "removal"
|
||||
name = "Deprecations and Removals"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "feature"
|
||||
name = "Features"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "bugfix"
|
||||
name = "Bug Fixes"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "vendor"
|
||||
name = "Vendored Libraries"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "doc"
|
||||
name = "Improved Documentation"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "trivial"
|
||||
name = "Trivial Changes"
|
||||
showcontent = false
|
||||
@@ -454,31 +454,9 @@ def test_crashing_item(testdir):
|
||||
pass
|
||||
""")
|
||||
result = testdir.runpytest("-n2", p)
|
||||
result.stdout.fnmatch_lines(
|
||||
["*crashed*::test_crash*", "*1 failed*1 passed*"])
|
||||
|
||||
|
||||
def test_crashing_item_teardown(testdir):
|
||||
p = testdir.makepyfile("""
|
||||
import py
|
||||
import pytest
|
||||
import os
|
||||
import time
|
||||
|
||||
@pytest.fixture
|
||||
def crash_fixture(request):
|
||||
def kill_me():
|
||||
py.process.kill(os.getpid())
|
||||
request.addfinalizer(kill_me)
|
||||
|
||||
def test_a(crash_fixture):
|
||||
pass
|
||||
|
||||
def test_b():
|
||||
pass
|
||||
""")
|
||||
result = testdir.runpytest("-n1", p)
|
||||
result.stdout.fnmatch_lines(["*crashed*::test_a*", "*1 failed*2 passed*"])
|
||||
result.stdout.fnmatch_lines([
|
||||
"*crashed*test_crash*", "*1 failed*1 passed*"
|
||||
])
|
||||
|
||||
|
||||
def test_skipping(testdir):
|
||||
|
||||
@@ -660,7 +660,7 @@ class DSession:
|
||||
If the node indicates it is finished with a test item, remove
|
||||
the item from the pending list in the scheduler.
|
||||
"""
|
||||
if rep.when == "teardown" or (rep.when == "setup" and not rep.passed):
|
||||
if rep.when == "call" or (rep.when == "setup" and not rep.passed):
|
||||
self.sched.mark_test_complete(node, rep.item_index, rep.duration)
|
||||
# self.report_line("testreport %s: %s" %(rep.id, rep.status))
|
||||
rep.node = node
|
||||
|
||||
Reference in New Issue
Block a user