コード例 #1
0
ファイル: brewery.py プロジェクト: alberthier/bhware
    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 =
|  .'-+-+-+|
コード例 #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 =
|  .'-+-+-+|
コード例 #3
0
ファイル: run_tests.py プロジェクト: alberthier/bhware
#!/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)
コード例 #4
0
def patch_tests(is_main_robot):
    patch_pythonpath()
    import definitions
    definitions.setup_definitions(is_main_robot)
コード例 #5
0
ファイル: brewery.py プロジェクト: alberthier/bhware
    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 =
|  .'-+-+-+|
コード例 #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)