Commit Graph

17 Commits

Author SHA1 Message Date
Nick Coghlan 2733d88dc2 Add test for runpy.run_module package execution and use something other than logging as the example of a non-executable package 2009-11-07 08:13:55 +00:00
Benjamin Peterson 5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Nick Coghlan ef01d822aa Implement PEP 366 2007-12-03 12:55:17 +00:00
Nick Coghlan 1a42ece0c7 Fix bug 1764407 - the -i switch now does the right thing when using the -m switch 2007-08-25 10:50:41 +00:00
Nick Coghlan 3af0e785e7 Revert misguided attempt at fixing incompatibility between -m and -i switches (better fix coming soon) 2007-08-25 04:32:07 +00:00
Brett Cannon dbed7a7394 Make test_runpy re-entrant. 2007-08-23 14:53:17 +00:00
Nick Coghlan 13c25c08ca Fix an incompatibility between the -i and -m command line switches as reported on python-dev by PJE - runpy.run_module now leaves any changes it makes to the sys module intact after the function terminates 2007-07-24 13:58:28 +00:00
Nick Coghlan 4f82a03714 Tweak runpy test to do a better job of confirming that sys has been manipulated correctly 2007-07-24 13:07:38 +00:00
Nick Coghlan ae21fc6d1f Correctly cleanup sys.modules after executing runpy relative import
tests
Restore Python 2.4 ImportError when attempting to execute a package
(as imports cannot be guaranteed to work properly if you try it)
2007-07-23 13:41:45 +00:00
Nick Coghlan f17a2e4f87 Add explicit relative import tests for runpy.run_module 2007-07-22 10:18:07 +00:00
Nick Coghlan 56829d5b4a Revert the __module_name__ changes made in rev 47142. We'll revisit this in Python 2.6 2006-07-06 12:53:04 +00:00
Nick Coghlan 999a336ad7 Make full module name available as __module_name__ even when __name__ is set to something else (like '__main__') 2006-06-28 10:41:47 +00:00
Tim Peters f99b8162a2 Whitespace normalization. 2006-03-15 18:08:37 +00:00
Nick Coghlan 598f8a0031 Don't try to explicitly set path in runpy package tests (tests were broken on Windows) 2006-03-15 13:29:19 +00:00
Nick Coghlan 586b83c4bb Don't let cleanup errors mask real errors in the runpy tests 2006-03-15 13:11:54 +00:00
Nick Coghlan 5424ad8a2a Make test_runpy close all references to test modules before trying to delete the underlying files 2006-03-15 12:40:38 +00:00
Nick Coghlan e2ebb2d7f7 Implement PEP 338 which has been marked as accepted by GvR 2006-03-15 11:00:26 +00:00