Skip to content

Historical notes in the docs #2625

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

Merged
merged 5 commits into from
Jul 29, 2017
Merged

Conversation

nicoddemus
Copy link
Member

Fixes #2512

Also:

  • Replaced deprecated config.option.<name> usages
  • Fixed some contact information

@nicoddemus nicoddemus requested a review from hackebrot July 27, 2017 23:10
@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.059% when pulling 59c1258 on nicoddemus:historical-notes into 1a9bc14 on pytest-dev:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.059% when pulling 6fe7069 on nicoddemus:historical-notes into 1a9bc14 on pytest-dev:master.

Copy link
Member

@hackebrot hackebrot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @nicoddemus! 👍

Few minor things that maybe we want to change.

@@ -19,9 +19,9 @@ Contact channels
- `pytest-commit at python.org (mailing list)`_: for commits and new issues

- :doc:`contribution guide <contributing>` for help on submitting pull
requests to bitbucket (including using git via gitifyhg).
requests to GitHub.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops! 🙈

@@ -17,7 +17,7 @@ example: specifying and selecting acceptance tests

class AcceptFixture(object):
def __init__(self, request):
if not request.config.option.acceptance:
if not request.config.getoption('acceptance'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

specify numbers like "-k 1.3" to match tests which are parametrized
with the float "1.3".
If you are using expressions such as ``"X and Y"`` then both ``X`` and ``Y``
need to be simple non-keyword names. For example, ``"pass"`` or ``"from"``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

names. For example

There's one extra space. Can you please delete that?

with the float "1.3".
If you are using expressions such as ``"X and Y"`` then both ``X`` and ``Y``
need to be simple non-keyword names. For example, ``"pass"`` or ``"from"``
will result in SyntaxErrors because ``"-k"`` evaluates the expression using Python's ``eval`` function.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the expression using Python's `eval`_ function.

.. _`eval`: https://docs.python.org/3.6/library/functions.html#eval


will result in SyntaxErrors because ``"-k"`` evaluates the expression using Python's ``eval`` function.

However, if the ``"-k"`` argument is a simple string, no such restrictions
apply. Also ``"-k 'not STRING'"`` has no restrictions. You can also
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restrictions. You

Please delete the extra space

The above ``usefixtures`` and ``autouse`` examples should help to mix in
pytest fixtures into unittest suites.

You can also consider incrementally leave away ``unittest.TestCase`` subclassing,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also gradually move away from subclassing from unittest.TestCase to plain asserts and benefit from the full pytest feature set.

@nicoddemus
Copy link
Member Author

Thanks @hackebrot, applied all your requested changes! 👍

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.059% when pulling 7082320 on nicoddemus:historical-notes into 1a9bc14 on pytest-dev:master.

pytest fixtures into unittest suites.

You can also gradually move away from subclassing from ``unittest.TestCase``
to *plain asserts* and the benefits from the full pytest feature set.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also gradually move away from subclassing from unittest.TestCase to plain asserts and then start to benefit from the full pytest feature set step by step.

Hmm is this better? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, indeed it is better!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.059% when pulling 8c23191 on nicoddemus:historical-notes into 1a9bc14 on pytest-dev:master.

Copy link
Member

@hackebrot hackebrot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@nicoddemus 🚀

@nicoddemus nicoddemus merged commit 5e0e038 into pytest-dev:master Jul 29, 2017
@nicoddemus nicoddemus deleted the historical-notes branch July 29, 2017 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants