This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bkabrda
Recipients bkabrda, r.david.murray
Date 2012-06-26.06:21:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340691682.17.0.834621891258.issue15178@psf.upfronthosting.co.za>
In-reply-to
Content
So I figured it might be best to first agree on the actual behaviour (what the patch will look like) and then I can write the tests.

So here is my 3rd version:
- It seems that returning 1 only if last file fails is intentional, as it is _inside_ the loop, so unsuccessful test immediately terminates the _test function - I thought it might be better to carry on with all of the tests, so here is what I did:
- I made a variable "failures", which represents if there were any failures during tests;
- I took the "return 1" one indentation level down, so all files are now traversed no matter how many of them fail;
- An error message is printed and "failures" set to True if a file is unopenable.

Does this look acceptable? If not, I will happily work further :) (and provide the tests once the behaviour is clear).

Thanks!
History
Date User Action Args
2012-06-26 06:21:22bkabrdasetrecipients: + bkabrda, r.david.murray
2012-06-26 06:21:22bkabrdasetmessageid: <1340691682.17.0.834621891258.issue15178@psf.upfronthosting.co.za>
2012-06-26 06:21:21bkabrdalinkissue15178 messages
2012-06-26 06:21:21bkabrdacreate