Example #1
0
from FGAme import conf
import FGAme
conf.set_backend('pygame')
print(FGAme.__version__)
print(FGAme.__file__)
from mario.levels import Level1

def main(): 
    world = Level1()
    world.run()

if __name__ == '__main__':
    main()
Example #2
0
from FGAme import conf

conf.set_backend('testing')
Example #3
0
Loads all tests in module and run
'''
import doctest
import sys
try:
    from unittest2 import main
except ImportError:
    from unittest import main

from smallvectors.tests import *  # @UnusedWildImport
from FGAme.tests import *  # @UnusedWildImport
import FGAme as mod_current
from FGAme import conf  # @Reimport


conf.set_backend('empty')
print('Starting tests using backend: %s' % conf.get_backend())


def load_tests(loader, tests, ignore):
    prefix = mod_current.__name__

    # Find doctests
    for modname, mod in sys.modules.items():
        if modname.startswith(prefix + '.') or modname == prefix:
            try:
                tests.addTests(doctest.DocTestSuite(mod))
            except ValueError:  # no docstring
                pass

    return tests
Example #4
0
from pytest import main
from FGAme import conf

if __name__ == '__main__':
    conf.set_backend('empty')
    main('-q')