Skip to content

Move test_stubs and test_samples to pytest - #5142

Merged
gvanrossum merged 2 commits into
python:masterfrom
elazarg:pytest-samples
Jun 23, 2018
Merged

gvanrossum merged 2 commits into
python:masterfrom
elazarg:pytest-samples

Conversation

@elazarg

@elazarg elazarg commented Jun 4, 2018

Copy link
Copy Markdown
Contributor

Using the api, similarly to #5087.

stdlibsamples is not included in this PR since it requires special handling of working directory and paths.

This is another item for #1673.

@emmatyping

Copy link
Copy Markdown
Member

Hm, we will have to be careful with this and #5051. I think it should be fine for me to rebase my PR on this.

Comment thread mypy/test/testsamples.py
run_mypy(mypy_args + [f])


def find_files(base: str, prefix: str = '', suffix: str = '') -> List[str]:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps these should be moved to mypy.test.helpers since they are used outside of this file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. It's a temporary hack in runtests.py, and should be moved here soon.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, that is true. I think this okay then.

@msullivan

Copy link
Copy Markdown
Collaborator

Any reason not to merge this now?

@gvanrossum

Copy link
Copy Markdown
Member

@msullivan

Any reason not to merge this now?

I haven't had the time to review it. If you trust Ethan and/or you've reviewed (and preferably tested) it yourself, go right ahead!

@emmatyping

Copy link
Copy Markdown
Member

@elazarg It seems there is a merge conflict. When you fix the merge conflict please also delete 3.3 from the list of tested typeshed directories.

@elazarg

elazarg commented Jun 22, 2018

Copy link
Copy Markdown
Contributor Author

@ethanhs done (I've also removed 3.4)

Comment thread mypy/test/testsamples.py
modules = []
# TODO: This should also test Python 2, and pass pyversion accordingly.
for version in ["2and3", "3", "3.5"]:
# FIX: remove 'builtins', this directory does not exist

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does "FIX:" mean? Is it a TODO? Why not do it now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess you are right. I think I didn't want to change anything

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.

4 participants