Ejemplo n.º 1
0
    parser.add_argument('statemachine', action="store", nargs='?', default = None)

    args = parser.parse_args()

    if args.statemachine is None:
        args.statemachine = args.hostname

    if args.pydev_debug :
        import sys
        if sys.platform=="darwin":
            sys.path.append('/Applications/PyCharm.app/pycharm-debug-py3k.egg')
            import pydevd
            pydevd.settrace(args.pydev_debug[0], port=int(args.pydev_debug[1]), stdoutToServer=True,
                                                          stderrToServer=True)

    definitions.setup_definitions(args.hostname == "doc")

    print('''      _
     ( )
      H
      H
     _H_
  .-'-.-'-.
 /         \\       ####   ####   #####  #   #  #####  ####   #   #
|           |      #   #  #   #  #      #   #  #      #   #  #   #
|   .-------'._    ####   ####   ###    # # #  ###    ####    # #
|  / /  '.' '. \\   #   #  #  #   #      # # #  #      #  #     #
|  \\ \\ @   @ / /   ####   #   #  #####   # #   #####  #   #    #
|   '---------'
|    _______|                       = 2014 =
|  .'-+-+-+|
Ejemplo n.º 2
0
    if args.pydev_debug:
        import sys
        if sys.platform == "darwin":
            sys.path.append(
                '/Applications/PyCharm.app/Contents/debug-eggs/pycharm-debug-py3k.egg'
            )
            print(sys.path)
            import pydevd
            pydevd.settrace(args.pydev_debug[0],
                            port=int(args.pydev_debug[1]),
                            stdoutToServer=True,
                            stderrToServer=True,
                            suspend=False)

    definitions.setup_definitions(args.hostname == "main")

    print('''      _
     ( )
      H
      H
     _H_
  .-'-.-'-.
 /         \\       ####   ####   #####  #   #  #####  ####   #   #
|           |      #   #  #   #  #      #   #  #      #   #  #   #
|   .-------'._    ####   ####   ###    # # #  ###    ####    # #
|  / /  '.' '. \\   #   #  #  #   #      # # #  #      #  #     #
|  \\ \\ @   @ / /   ####   #   #  #####   # #   #####  #   #    #
|   '---------'
|    _______|                       = 2015 =
|  .'-+-+-+|
Ejemplo n.º 3
0
#!/usr/bin/env python3
# encoding: utf-8

import unittest
import os
import sys




def patch_pythonpath():
    brewery_root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
    to_append = os.path.join(brewery_root_path, "brewery")
    if not to_append in sys.path :
        sys.path.append(to_append)




if __name__ == "__main__":
    patch_pythonpath()
    import definitions
    definitions.setup_definitions()
    names = []
    for f in os.listdir(os.path.dirname(os.path.realpath(__file__))):
        if f.endswith(".py") and f.startswith("test"):
            names.append(f[:-3])
    suite = unittest.defaultTestLoader.loadTestsFromNames(names)

    unittest.TextTestRunner().run(suite)
Ejemplo n.º 4
0
def patch_tests(is_main_robot):
    patch_pythonpath()
    import definitions
    definitions.setup_definitions(is_main_robot)
Ejemplo n.º 5
0
    args = parser.parse_args()

    if args.statemachine is None:
        args.statemachine = args.hostname

    if args.pydev_debug:
        import sys
        if sys.platform == "darwin":
            sys.path.append('/Applications/PyCharm.app/pycharm-debug-py3k.egg')
            import pydevd
            pydevd.settrace(args.pydev_debug[0],
                            port=int(args.pydev_debug[1]),
                            stdoutToServer=True,
                            stderrToServer=True)

    definitions.setup_definitions(args.hostname == "doc")

    print('''      _
     ( )
      H
      H
     _H_
  .-'-.-'-.
 /         \\       ####   ####   #####  #   #  #####  ####   #   #
|           |      #   #  #   #  #      #   #  #      #   #  #   #
|   .-------'._    ####   ####   ###    # # #  ###    ####    # #
|  / /  '.' '. \\   #   #  #  #   #      # # #  #      #  #     #
|  \\ \\ @   @ / /   ####   #   #  #####   # #   #####  #   #    #
|   '---------'
|    _______|                       = 2014 =
|  .'-+-+-+|
Ejemplo n.º 6
0
#!/usr/bin/env python3
# encoding: utf-8

import unittest
import os
import sys


def patch_pythonpath():
    brewery_root_path = os.path.dirname(
        os.path.dirname(os.path.realpath(__file__)))
    to_append = os.path.join(brewery_root_path, "brewery")
    if not to_append in sys.path:
        sys.path.append(to_append)


if __name__ == "__main__":
    patch_pythonpath()
    import definitions
    definitions.setup_definitions()
    names = []
    for f in os.listdir(os.path.dirname(os.path.realpath(__file__))):
        if f.endswith(".py") and f.startswith("test"):
            names.append(f[:-3])
    suite = unittest.defaultTestLoader.loadTestsFromNames(names)

    unittest.TextTestRunner().run(suite)