New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue469: add fix junit double colon split issue #1431

Merged
merged 1 commit into from Mar 3, 2016

Conversation

Projects
None yet
3 participants
@tomviner
Contributor

tomviner commented Mar 2, 2016

Fix for #469

A Node ID with all the components looks like this:
testing/test_skipping.py::TestSkipif::()::test_skipif_reporting_multiple[param-data-maybe-a-some-colons-::]

This PR:

  • Split the nodeid by [, before splitting by ::
  • remove .py only when at end of file path
@@ -619,6 +620,20 @@ def test_func(char):
node.assert_attr(name="test_func[#x00]")
def test_double_colon_split_issue469(testdir):

This comment has been minimized.

@nicoddemus

nicoddemus Mar 3, 2016

Member

Could you please also add another integration test, this time using a test method instead of a test function? Just to be safe. 😁

This comment has been minimized.

@tomviner

tomviner Mar 3, 2016

Contributor

Yeah I originally wrote one, but changed by mind!

Added in #1432

@@ -102,6 +103,7 @@
.. _`traceback style docs`: https://pytest.org/latest/usage.html#modifying-python-traceback-printing
.. _#469: https://github.com/pytest-dev/pytest/issues/469

This comment has been minimized.

@nicoddemus

nicoddemus Mar 3, 2016

Member

I realize this is the first time we are formatting the changelog like this, but I think this link would be better placed above the 2.9.0 header line, so the link targets reside at the bottom of their respective version headers.

This comment has been minimized.

@tomviner

tomviner Mar 3, 2016

Contributor

Moved in #1432 plus a couple of comments on the changelog.

@@ -5,7 +5,8 @@
*
*
* Fix (`#469`_): junit parses report.nodeid incorrectly, when params contain
``::``.

This comment has been minimized.

@nicoddemus

nicoddemus Mar 3, 2016

Member

Please add a "Thanks @tomviner" here. 😁

@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Mar 3, 2016

Thanks a lot for tackling this @tomviner! We really appreciate it.

I would like for @RonnyPfannschmidt to take a second look if possible. Other than my comments, this looks good to me. 👍

@RonnyPfannschmidt

This comment has been minimized.

Member

RonnyPfannschmidt commented Mar 3, 2016

looks fine, good work

RonnyPfannschmidt added a commit that referenced this pull request Mar 3, 2016

Merge pull request #1431 from tomviner/issue469-junit-double-colon
fix #469 - correctly mangle junit test names when double colons are in parameter id's

@RonnyPfannschmidt RonnyPfannschmidt merged commit 7aa7c6b into pytest-dev:master Mar 3, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Apr 14, 2016

wiz
Update py-test to 2.9.1.
2.9.1
=====

**Bug Fixes**

* Improve error message when a plugin fails to load.
  Thanks `@nicoddemus`_ for the PR.

* Fix (`#1178 <https://github.com/pytest-dev/pytest/issues/1178>`_):
  ``pytest.fail`` with non-ascii characters raises an internal pytest error.
  Thanks `@nicoddemus`_ for the PR.

* Fix (`#469`_): junit parses report.nodeid incorrectly, when params IDs
  contain ``::``. Thanks `@tomviner`_ for the PR (`#1431`_).

* Fix (`#578 <https://github.com/pytest-dev/pytest/issues/578>`_): SyntaxErrors
  containing non-ascii lines at the point of failure generated an internal
  py.test error.
  Thanks `@asottile`_ for the report and `@nicoddemus`_ for the PR.

* Fix (`#1437`_): When passing in a bytestring regex pattern to parameterize
  attempt to decode it as utf-8 ignoring errors.

* Fix (`#649`_): parametrized test nodes cannot be specified to run on the command line.


.. _#1437: pytest-dev/pytest#1437
.. _#469: pytest-dev/pytest#469
.. _#1431: pytest-dev/pytest#1431
.. _#649: pytest-dev/pytest#649

.. _@asottile: https://github.com/asottile


2.9.0
=====

**New Features**

* New ``pytest.mark.skip`` mark, which unconditionally skips marked tests.
  Thanks `@MichaelAquilina`_ for the complete PR (`#1040`_).

* ``--doctest-glob`` may now be passed multiple times in the command-line.
  Thanks `@jab`_ and `@nicoddemus`_ for the PR.

* New ``-rp`` and ``-rP`` reporting options give the summary and full output
  of passing tests, respectively. Thanks to `@codewarrior0`_ for the PR.

* ``pytest.mark.xfail`` now has a ``strict`` option, which makes ``XPASS``
  tests to fail the test suite (defaulting to ``False``). There's also a
  ``xfail_strict`` ini option that can be used to configure it project-wise.
  Thanks `@rabbbit`_ for the request and `@nicoddemus`_ for the PR (`#1355`_).

* ``Parser.addini`` now supports options of type ``bool``.
  Thanks `@nicoddemus`_ for the PR.

* New ``ALLOW_BYTES`` doctest option. This strips ``b`` prefixes from byte strings
  in doctest output (similar to ``ALLOW_UNICODE``).
  Thanks `@jaraco`_ for the request and `@nicoddemus`_ for the PR (`#1287`_).

* Give a hint on ``KeyboardInterrupt`` to use the ``--fulltrace`` option to show the errors.
  Fixes `#1366`_.
  Thanks to `@hpk42`_ for the report and `@RonnyPfannschmidt`_ for the PR.

* Catch ``IndexError`` exceptions when getting exception source location.
  Fixes a pytest internal error for dynamically generated code (fixtures and tests)
  where source lines are fake by intention.

**Changes**

* **Important**: `py.code <http://pylib.readthedocs.org/en/latest/code.html>`_ has been
  merged into the ``pytest`` repository as ``pytest._code``. This decision
  was made because ``py.code`` had very few uses outside ``pytest`` and the
  fact that it was in a different repository made it difficult to fix bugs on
  its code in a timely manner. The team hopes with this to be able to better
  refactor out and improve that code.
  This change shouldn't affect users, but it is useful to let users aware
  if they encounter any strange behavior.

  Keep in mind that the code for ``pytest._code`` is **private** and
  **experimental**, so you definitely should not import it explicitly!

  Please note that the original ``py.code`` is still available in
  `pylib <http://pylib.readthedocs.org>`_.

* ``pytest_enter_pdb`` now optionally receives the pytest config object.
  Thanks `@nicoddemus`_ for the PR.

* Removed code and documentation for Python 2.5 or lower versions,
  including removal of the obsolete ``_pytest.assertion.oldinterpret`` module.
  Thanks `@nicoddemus`_ for the PR (`#1226`_).

* Comparisons now always show up in full when ``CI`` or ``BUILD_NUMBER`` is
  found in the environment, even when ``-vv`` isn't used.
  Thanks `@The-Compiler`_ for the PR.

* ``--lf`` and ``--ff`` now support long names: ``--last-failed`` and
  ``--failed-first`` respectively.
  Thanks `@MichaelAquilina`_ for the PR.

* Added expected exceptions to ``pytest.raises`` fail message.

* Collection only displays progress ("collecting X items") when in a terminal.
  This avoids cluttering the output when using ``--color=yes`` to obtain
  colors in CI integrations systems (`#1397`_).

**Bug Fixes**

* The ``-s`` and ``-c`` options should now work under ``xdist``;
  ``Config.fromdictargs`` now represents its input much more faithfully.
  Thanks to `@bukzor`_ for the complete PR (`#680`_).

* Fix (`#1290`_): support Python 3.5's ``@`` operator in assertion rewriting.
  Thanks `@Shinkenjoe`_ for report with test case and `@tomviner`_ for the PR.

* Fix formatting utf-8 explanation messages (`#1379`_).
  Thanks `@biern`_ for the PR.

* Fix `traceback style docs`_ to describe all of the available options
  (auto/long/short/line/native/no), with `auto` being the default since v2.6.
  Thanks `@hackebrot`_ for the PR.

* Fix (`#1422`_): junit record_xml_property doesn't allow multiple records
  with same name.

.. _`traceback style docs`: https://pytest.org/latest/usage.html#modifying-python-traceback-printing

.. _#1422: pytest-dev/pytest#1422
.. _#1379: pytest-dev/pytest#1379
.. _#1366: pytest-dev/pytest#1366
.. _#1040: pytest-dev/pytest#1040
.. _#680: pytest-dev/pytest#680
.. _#1287: pytest-dev/pytest#1287
.. _#1226: pytest-dev/pytest#1226
.. _#1290: pytest-dev/pytest#1290
.. _#1355: pytest-dev/pytest#1355
.. _#1397: pytest-dev/pytest#1397
.. _@biern: https://github.com/biern
.. _@MichaelAquilina: https://github.com/MichaelAquilina
.. _@bukzor: https://github.com/bukzor
.. _@hpk42: https://github.com/hpk42
.. _@nicoddemus: https://github.com/nicoddemus
.. _@jab: https://github.com/jab
.. _@codewarrior0: https://github.com/codewarrior0
.. _@jaraco: https://github.com/jaraco
.. _@The-Compiler: https://github.com/The-Compiler
.. _@Shinkenjoe: https://github.com/Shinkenjoe
.. _@tomviner: https://github.com/tomviner
.. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
.. _@rabbbit: https://github.com/rabbbit
.. _@hackebrot: https://github.com/hackebrot

@pyup-bot pyup-bot referenced this pull request Jun 9, 2016

Merged

Initial Update #33

@pyup-bot pyup-bot referenced this pull request Jul 19, 2016

Merged

Initial Update #20

@pyup-bot pyup-bot referenced this pull request Aug 4, 2016

Merged

Initial Update #43

@pyup-bot pyup-bot referenced this pull request Sep 19, 2017

Merged

Initial Update #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment