Пример #1
0
from manygui import backend
from manygui.Utils import log
import manygui

log('The current backend is:', backend())
log("No output below this line indicates success")
assert backend() in manygui._backends or backend() == 'dummy'
Пример #2
0
from glob import glob
import sys, os

import manygui
from manygui.Utils import log

try:
    skip_tests = os.environ['MANYGUI_SKIP'].split()
except:
    skip_tests = []
skip_tests.sort()
if skip_tests:
    log('skipping %d tests:'%len(skip_tests),)
    for test in skip_tests:
        log(test,)
    print()

if manygui.backend() in ('text', 'curses'):
    manygui.Utils.setLogFile(open('manygui_test.log', 'a'))

run_tests = [test for test in glob('test_*.py') if test not in skip_tests]
run_tests.sort()
log('running %d tests:'%len(run_tests),)
for test in run_tests:
    log(test,)
print()

for filename in run_tests:
    log("Running", filename)
    exec(compile(open(filename).read(), filename, 'exec'), {})
Пример #3
0
from manygui import backend
from manygui.Utils import log
import manygui

log('The current backend is:', backend())
log("No output below this line indicates success")
assert backend() in manygui._backends