示例#1
0
globalVars.appArgs = AppArgs()

# We depend on the current directory to load some files;
# e.g. braille imports louis which loads liblouis.dll using a relative path.
os.chdir(SOURCE_DIR)
# The path to this package might be relative, so make it absolute,
# since we just changed directory.
__path__[0] = UNIT_DIR
# We don't want logging for now,
# though we may optionally want this in future; see #7045.
import logging
from logHandler import log
log.addHandler(logging.NullHandler())
# There's no point in logging anything at all, since it'll go nowhere.
log.setLevel(100)

# Much of this should eventually be replaced by stuff which gets reset before each test
# so the tests are isolated.
import config
config.initialize()
# Initialize languageHandler so that translatable strings work.
import languageHandler
languageHandler.setLanguage("en")
# NVDAObjects need appModuleHandler to be initialized.
import appModuleHandler
appModuleHandler.initialize()
# Anything which notifies of cursor updates requires braille and vision to be initialized.
# Suppress Flake8 warning E402 (Module level import not at top of file)
import vision  # noqa: E402
vision.initialize()
示例#2
0
	launcher = False
globalVars.appArgs = AppArgs()

# We depend on the current directory to load some files;
# e.g. braille imports louis which loads liblouis.dll using a relative path.
os.chdir(SOURCE_DIR)
# The path to this package might be relative, so make it absolute,
# since we just changed directory.
__path__[0] = UNIT_DIR
# We don't want logging for now,
# though we may optionally want this in future; see #7045.
import logging
from logHandler import log
log.addHandler(logging.NullHandler())
# There's no point in logging anything at all, since it'll go nowhere.
log.setLevel(100)

# Much of this should eventually be replaced by stuff which gets reset before each test
# so the tests are isolated.
import config
config.initialize()
# Initialize languageHandler so that translatable strings work.
import languageHandler
languageHandler.setLanguage("en")
# NVDAObjects need appModuleHandler to be initialized.
import appModuleHandler
appModuleHandler.initialize()
# Anything which notifies of cursor updates requires braille to be initialized.
import braille
braille.initialize()
# For braille unit tests, we need to construct a fake braille display as well as enable the braille handler