Conversation
|
I'm not sure why it doesn't load the config from the generated pytest.ini and instead it picks tox.ini. Should I pass it explicitly as an argument |
Sorry what do you mean? You are not talking about the failing CI right, because it failed during linting. |
|
I'm talking about the AppVeyor CI which failed |
|
Oh sorry did not realize that, I only looked at Travis. It is confusing (and I just noticed this now), but pytest/src/_pytest/pytester.py Lines 578 to 580 in f2e35c8 So it seems it is picking up the correct file: |
|
Ok, then why is it disregarding the python_files option from the ini file. I'm still confused... It's working fine when I run it locally. |
|
Please try to fix the linting issue so Travis can execute the rest of the jobs. This way we will know if it is a windows only issue or a difference between CI and your setup. I'll be glad to help out with Windows if I can. 👍 |
Uhm, I'm not sure what's |
|
|
black is our code formatter. 😉 Take a look at the contribution guide on how to install |
|
Ok, done that, I did a quick tox -e linting, and still nothing. |
Strange, that usually does the trick for me... I will check your branch later when I get home. 👍 Meanwhile if @asottile has some time to help it would be great as well. |
|
Implicit conflict with master, I changed the import in #3864 merge / rebase and you should be good! |
nicoddemus
left a comment
There was a problem hiding this comment.
Great work @jonozzz! Please take a look at my comments and see what you think.
Also please add a CHANGELOG entry for the fix. 👍
testing/python/fixture.py
Outdated
| def fix(): | ||
| values.append("pre-sub1") | ||
| yield values | ||
| values.pop() |
There was a problem hiding this comment.
Perhaps this should be
assert values.pop() == "pre-sub1"for completeness?
testing/python/fixture.py
Outdated
| def fix(): | ||
| values.append("pre-sub2") | ||
| yield values | ||
| values.pop() |
There was a problem hiding this comment.
Perhaps this should be
assert values.pop() == "pre-sub2"for completeness?
| sub2.ensure("__init__.py") | ||
| sub2.join("conftest.py").write( | ||
| textwrap.dedent( | ||
| """\ |
There was a problem hiding this comment.
To avoid this weird line break by black I usually put the triple strings into a variable:
contents = dedent("""\
...
""")
sub2.join("conftest.py").write(contents)But really up to you, just in case this bothers you. 😉
There was a problem hiding this comment.
black is going to reformat that to:
contents = dedent(
"""\
...
"""
):rip:
There was a problem hiding this comment.
you can do this:
x = """\
...
"""
print(dedent(x))but then. meh.
|
@nicoddemus any idea what's up with the failures in the windows CI? |
|
Don't know why |
|
I printed the yielded objects in This seems correct to me... |
|
Pushed a fix for |
…ames. The test doesn't make sense for Windows, because of its case-insensitivity.
|
@jonozzz I noticed you pushed another commit to fix |
|
Well, the whole point of the test was to have a test filename with capital letters. I'd keep all files that start with 'Test'. |
Oh I did not realize that, thanks! |
|
I was able to repro the other issue on a local windows machine. I'm looking into it, but I'm still confused. |
|
Finally! I hope I squashed that bug. Turns out this new test uncovered an older issue. Phew! |
|
I tested locally and indeed it works, great job! Just need to fix |
|
@jonozzz btw if you run |
|
Got too excited and pushed it without checking. |
|
@jonozzz btw if you add "Fix #NUMBER" to the PR or to one of the commits, the issue will be closed automatically when merged (I just updated the PR description adding that). You can see more here: https://help.github.com/articles/closing-issues-using-keywords/ |
|
Thanks. Everyday I learn new things 😁 I hope next PRs won't be as messy as this one. |
Not at all, anyway it is all part of the process, and we really appreciate all your efforts on this front! 👍 |
If a test was found in a file that started with a capital letter within a subpackage of a package pytest would collect it twice.
Fix #3796, fix #3854