Skip to content
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

Move test data out of mypy/ #1667

Merged
merged 3 commits into from
Jun 11, 2016
Merged

Move test data out of mypy/ #1667

merged 3 commits into from
Jun 11, 2016

Conversation

gnprice
Copy link
Collaborator

@gnprice gnprice commented Jun 7, 2016

This makes it easier to grep through our codebase to find things
quickly without getting noise from matches in our tests --
after all, our test data naturally has a lot of Python code,
just like mypy itself. #compilerworldproblems

Specifically, move what was mypy/test/data/ inside a new directory
test-data/. While we're at it, tuck samples/ and stdlib-samples/
under test-data/ too. This is probably still not the perfect layout
(e.g., does stdlib-samples/ need to be special, or can it just be more
samples organized into a directory under samples/?), but with all the
file moves in this commit I wanted to keep the necessary logic changes
to an absolute minimum for ease of reading and reviewing.

The -M flag to git show/diff/log is highly recommended when
looking at this commit.

@@ -1,6 +1,5 @@
"""Tests for the mypy parser

Test case descriptions are in files test/data/parse[-errors].test."""
"""
Copy link
Member

Choose a reason for hiding this comment

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

Proper docstring style is actually to have the close """ on the same line iff it's a single line. So it was wrong, and it's still wrong. :-)

@gvanrossum
Copy link
Member

LGTM except for the docstring nit! I've wanted this for so long...

(I also want all test code out of the mypy package, but that may have to wait and it's also a bit debatable.)

@gvanrossum
Copy link
Member

Are you sure samples/ is test data? I thought it was examples. Though
stdlib-samples is inded test data.

On Monday, June 6, 2016, Greg Price [email protected] wrote:

This makes it easier to grep through our codebase to find things
quickly without getting noise from matches in our tests --
after all, our test data naturally has a lot of Python code,
just like mypy itself. #compilerworldproblems

Specifically, move what was mypy/test/data/ inside a new directory
test-data/. While we're at it, tuck samples/ and stdlib-samples/
under test-data/ too. This is probably still not the perfect layout
(e.g., does stdlib-samples/ need to be special, or can it just be more
samples organized into a directory under samples/?), but with all the
file moves in this commit I wanted to keep the necessary logic changes
to an absolute minimum for ease of reading and reviewing.

The -M flag to git show/diff/log is highly recommended when

looking at this commit.

You can view, comment on, or merge this pull request online at:

#1667
Commit Summary

  • Move test data out of mypy/

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1667, or mute the thread
https://github.com/notifications/unsubscribe/ACwrMlKSCCT9RA62ySR9K3lIKHo1lP1dks5qJMZ7gaJpZM4Ivdsb
.

--Guido (mobile)

@gnprice
Copy link
Collaborator Author

gnprice commented Jun 7, 2016

Pushed a fix to that docstring. :-)

We do use samples/ as test data -- see add_samples in runtests.py. Which isn't to say it doesn't also serve as examples to look at. My guess is that Jukka originally wrote them as examples of code in the Mypy language.

@gvanrossum
Copy link
Member

OK. LGTM.

--Guido (mobile)
On Jun 7, 2016 12:07 PM, "Greg Price" [email protected] wrote:

Pushed a fix to that docstring. :-)

We do use samples/ as test data -- see add_samples in runtests.py. Which
isn't to say it doesn't also serve as examples to look at. My guess is that
Jukka originally wrote them as examples of code in the Mypy language.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1667 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ACwrMtQ3aGjwmWbB5k0--7pOxdpJOdS-ks5qJcF0gaJpZM4Ivdsb
.

@gnprice
Copy link
Collaborator Author

gnprice commented Jun 7, 2016

(We're going to hold this a couple of days for the 0.4.2 release, after which I'll rebase and merge.)

@JukkaL
Copy link
Collaborator

JukkaL commented Jun 10, 2016

This is good to rebase and merge now!

gnprice added 3 commits June 10, 2016 16:39
This makes it easier to grep through our codebase to find things
quickly without getting noise from matches in our tests --
after all, our test data naturally has a lot of Python code,
just like mypy itself.  #compilerworldproblems

Specifically, move what was mypy/test/data/ inside a new directory
test-data/.  While we're at it, tuck samples/ and stdlib-samples/
under test-data/ too.  This is probably still not the perfect layout
(e.g., does stdlib-samples/ need to be special, or can it just be more
samples organized into a directory under samples/?), but with all the
file moves in this commit I wanted to keep the necessary logic changes
to an absolute minimum for ease of reading and reviewing.

The `-M` flag to `git show/diff/log` is highly recommended when
looking at this commit.
@gnprice gnprice merged commit c2eefec into python:master Jun 11, 2016
@gnprice gnprice deleted the data branch June 11, 2016 00:27
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.

3 participants