4 ms·
IMO, comments and tests should be written alongside the original code, not left up to someone else. If you don't have access to the test infrastructure, how di
by panic 10y ago
IMO, comments and tests should be written alongside the original code, not left up to someone else. If you don't have access to the test infrastructure, how did you test your code before submitting it?
- geofft 10y agoIn general, I test things in my environment, for the use case I have, which is the only way I can confirm that it fixes the actual problem I'm having. I'm not an expert in every test harness out there, and I generally expect the maintainer knows better than I do. But beyond that, for most projects, tests apply to multiple environments, and I'm only guaranteed to have mine. If a project is supported on Windows, Mac, and Linux, on Python 2.7, 3.3, 3.4, and 3.5, I probably have one, maybe two, of those twelve choices. It makes more sense to reuse the project's test infrastructure than for me to track down the other eleven configurations. And as a random contributor, I might not have access to the test environments. Of course, if the tests fail, that's a valid reason to push back on me (or for the maintainer to fix the problem and squash, if it requires access to an environment I don't have).