Skip to content

Convert pytest.py into a package#6304

Merged
nicoddemus merged 1 commit intopytest-dev:masterfrom
nicoddemus:pytest-as-pkg
Dec 3, 2019
Merged

Convert pytest.py into a package#6304
nicoddemus merged 1 commit intopytest-dev:masterfrom
nicoddemus:pytest-as-pkg

Conversation

@nicoddemus
Copy link
Member

@nicoddemus nicoddemus commented Dec 2, 2019

As discussed in #3342, this is the first step to make pytest fully support static typing.

Had a few minutes on my hands so decide to tackle this.

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

@bluetech
Copy link
Member

bluetech commented Dec 2, 2019

My PR from yesterday #6302 is pretty much the same. It failed CI twice on the Azure py37 job, timing out on the testing/test_assertion.py::test_exception_handling_no_traceback test. It seems like this one is going down the same path. I haven't looked but not sure how this affects this test, and it doesn't reproduce locally.

@nicoddemus
Copy link
Member Author

nicoddemus commented Dec 2, 2019

Oh really sorry @bluetech, I've completely missed the notification on #6302 (in fact I still can't see it in my Inbox, weird), otherwise I wouldn't have opened this one. 😓

@CaselIT
Copy link

CaselIT commented Dec 2, 2019

Sorry if already discusses somewhere, the long term plan is to remove the _pytest package in favor of this one?

@nicoddemus
Copy link
Member Author

Sorry if already discusses somewhere, the long term plan is to remove the _pytest package in favor of this one?

No, the pytest package contains only symbols of the public API, while _pytest contains the actual codebase.

@nicoddemus
Copy link
Member Author

It is incredible how it is basically impossible to restart an Azure job... Clicking on Rebuild on the menu below does absolutely nothing:

image

@asottile
Copy link
Member

asottile commented Dec 2, 2019

the failure is quite weird, I can't reproduce it w/ 3.7.5x64 locally running tox -e py37-twisted-numpy 🤔

@nicoddemus
Copy link
Member Author

the failure is quite weird, I can't reproduce it w/ 3.7.5x64 locally running

Me neither... just pushed a skip for that test to see if it is that test the culprit, or something else.

@nicoddemus
Copy link
Member Author

Weird, it is just that test who seems to be stucking CI... 🤔

@nicoddemus
Copy link
Member Author

Rá looking at the test things are clearer: the test uses multiprocessing, so having the __main__ guard as @RonnyPfannschmidt pointed out is mandatory. 😁

As discussed in pytest-dev#3342, this
is the first step to make pytest support static typing fully
@nicoddemus nicoddemus merged commit 1dc612f into pytest-dev:master Dec 3, 2019
@nicoddemus nicoddemus deleted the pytest-as-pkg branch December 3, 2019 00:10
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.

5 participants