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

starting on an empty requirements file #8

Merged
merged 9 commits into from Mar 19, 2015

Conversation

Projects
None yet
2 participants
@peterbe
Owner

peterbe commented Mar 17, 2015

No description provided.

tests.py Outdated
httpretty.GET,
"https://pypi.python.org/pypi/peepin",
body="""
<div id="content">

This comment has been minimized.

@erikrose

erikrose Mar 17, 2015

Did you want to close this eventually?

This comment has been minimized.

@peterbe

peterbe Mar 17, 2015

Owner

Doesn't matter. It's a regex that looks for certain hrefs

tests.py Outdated
body="Some tarball content\n",
)
with tmpfile() as filename:
open(filename, 'w').write('')

This comment has been minimized.

@erikrose

erikrose Mar 17, 2015

Why not use with open here?

This comment has been minimized.

@peterbe

peterbe Mar 17, 2015

Owner

Does that matter in test code? After all, file descriptors will be cleaned up after finishing the tests.
I thought properly closing is only relevant in daemon-like code or code with infinite loops like tornado.

tests.py Outdated
open(filename, 'w').write('')
retcode = peepin.run('peepin==0.10', filename)
self.assertEqual(retcode, 0)
output = open(filename).read()

This comment has been minimized.

@erikrose

erikrose Mar 17, 2015

Not strictly necessary, but it would be good hygiene to close this file handle as well.

This comment has been minimized.

@peterbe

peterbe Mar 17, 2015

Owner

It does close the file as soon as the test ends.

tests.py Outdated
)
httpretty.register_uri(
httpretty.GET,
"https://pypi.python.org/packages/2.7/p/peepin/peepin-0.10-py2-none-any.whl#md5=0a",

This comment has been minimized.

@erikrose

erikrose Mar 17, 2015

Those are really short MD5 hashes. What's up with that?

This comment has been minimized.

@peterbe

peterbe Mar 17, 2015

Owner

I truncated them so the lines wouldn't be so darn long.

@erikrose

This comment has been minimized.

erikrose commented Mar 17, 2015

Otherwise, looks sane to me!

@peterbe peterbe closed this Mar 17, 2015

@peterbe peterbe reopened this Mar 17, 2015

@peterbe peterbe closed this Mar 17, 2015

@peterbe peterbe reopened this Mar 17, 2015

@peterbe

This comment has been minimized.

Owner

peterbe commented Mar 17, 2015

Grr... I can't get the tests to ever finish for py 3.4. I wonder if it's a coincidence that it's first in the list. It always seems to hang for 10 minutes after it concludes that all tests passed fine.

peterbe added a commit that referenced this pull request Mar 19, 2015

Merge pull request #8 from peterbe/starting-on-an-empty-requirements-…
…file

starting on an empty requirements file

@peterbe peterbe merged commit 9bd5a6f into master Mar 19, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@peterbe peterbe deleted the starting-on-an-empty-requirements-file branch Mar 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment