[issue18492] Add test.support.regrtest_run flag, simplify support.requires

2013-07-21 Thread Zachary Ware
Zachary Ware added the comment: Terry J. Reedy added the comment: The problem is that this permissiveness does not apply to subsidiary files discovered from and run by a main file, even though it should. The current workaround is to explicitly set use_resources for the benefit of subsidiary

[issue18492] Add test.support.regrtest_run flag, simplify support.requires

2013-07-19 Thread R. David Murray
R. David Murray added the comment: Since we only use unittest for running subsets of our test suite, I think the better behavior is to run everything that -u all normally runs. That is, when one uses unittest to run a bit of the test suite, one generally wants to run the tests one specifies,

[issue18492] Add test.support.regrtest_run flag, simplify support.requires

2013-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Currently, all requires() tests pass when the file they occur in is run as '__main__'. This is especially needed when the file ends with the now standard boilerplate. if __name__ == '__main__': ... unittest.main(...) as there is currently no way

[issue18492] Add test.support.regrtest_run flag, simplify support.requires

2013-07-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: #18441 is partly related in that it also suggests (eventually) moving check code (for guis) from multiple test files to support and regrtest. I do not believe there would be any conflict. -- ___ Python tracker

[issue18492] Add test.support.regrtest_run flag, simplify support.requires

2013-07-18 Thread Zachary Ware
New submission from Zachary Ware: Here's a patch to implement the idea I posted in issue18258, msg193242. The patch also removes usage of support.use_resources = ['resource'] from the test package since it is no longer needed. (No test_main - unittest.main conversions are done in this patch;

[issue18492] Add test.support.regrtest_run flag, simplify support.requires

2013-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think we should accept anything if not running under regrtest, We can unintentionally run a testfile in which some tests consume a lot of resources. Also we need in skipping this tests for the test testing. I think it will be better just add a