-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Conversation
59c1258
to
6fe7069
Compare
There was a problem hiding this 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. |
There was a problem hiding this comment.
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'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
doc/en/example/markers.rst
Outdated
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"`` |
There was a problem hiding this comment.
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?
doc/en/example/markers.rst
Outdated
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. |
There was a problem hiding this comment.
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
doc/en/example/markers.rst
Outdated
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 |
There was a problem hiding this comment.
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
doc/en/unittest.rst
Outdated
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, |
There was a problem hiding this comment.
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.
Thanks @hackebrot, applied all your requested changes! 👍 |
doc/en/unittest.rst
Outdated
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. |
There was a problem hiding this comment.
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? 🤔
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Fixes #2512
Also:
config.option.<name>
usages