-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Using tmp as pwd in pytests #1068
Conversation
@@ -102,6 +102,8 @@ def test_close(): | |||
@pytest.mark.parametrize( | |||
("str_expr", "msgs", "str_expected", "fail_msg"), | |||
[ | |||
(None, None, None, None), # Reset the session and set the working |
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.
It is not obvious to me why this should work. Couldn't this be done as test setup instead?
Also note that there are ways to run something per test suite or test module as well. (I don't know the exact syntax though.) |
converted into a Python string. Otherwise, the expression is kept | ||
as an Expression object. | ||
If this argument is set to ``None``, the session is reset. | ||
str_expr: The expression to be tested. If its value is ``None``, the session is |
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.
@rocky, when you call a None
test, this function calls reset_session
, and this is why it works.
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.
This is convoluted.
As General Peron said, "Better than saying is doing". This is what I was talking about in #1067.
Also, I improved some docstrings a little bit.