mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Add import_function method to test.test_support, and modify a number of
tests that expect to be skipped if imports fail or functions don't exist to use import_function and import_module. The ultimate goal is to change regrtest to not skip automatically on ImportError. Checking in now to make sure the buldbots don't show any errors on platforms I can't direct test on.
This commit is contained in:
parent
bb8cb0e192
commit
59beec326a
20 changed files with 78 additions and 41 deletions
|
@ -1,12 +1,15 @@
|
|||
# Test the windows specific win32reg module.
|
||||
# Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey
|
||||
|
||||
from _winreg import *
|
||||
import os, sys
|
||||
import unittest
|
||||
|
||||
from test import test_support
|
||||
|
||||
#Do this first so test will be skipped if module doesn't exist
|
||||
test_support.import_module('_winreg')
|
||||
#Now import everything
|
||||
from _winreg import *
|
||||
|
||||
test_key_name = "SOFTWARE\\Python Registry Test Key - Delete Me"
|
||||
|
||||
test_data = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue