Esempio n. 1
0
def ride():
    if HAS_RIDE:
        from robotide import main

        main(*sys.argv[1:])
    else:
        print u"""\
Esempio n. 2
0
def pybabel():
    # This registers our minimal robot translation extractor
    import babel.messages.extract

    babel.messages.extract.DEFAULT_MAPPING.extend(
        [
            ("**.rst", "plone.app.robotframework.pybabel:extract_robot"),
            ("**.robot", "plone.app.robotframework.pybabel:extract_robot"),
        ]
    )

    # This code hides warnings for known Sphinx-only-directives when
    # executing pybot against Sphinx-documentation:
    from docutils.parsers.rst.directives import register_directive
    from docutils.parsers.rst.roles import register_local_role

    dummy_directive = lambda *args: []
    options = ("maxdepth", "creates", "numbered", "hidden")
    setattr(dummy_directive, "content", True)
    setattr(dummy_directive, "options", dict([(opt, str) for opt in options]))
    register_directive("toctree", dummy_directive)
    register_directive("robotframework", dummy_directive)
    register_local_role("ref", dummy_directive)

    from babel.messages.frontend import main

    main()
Esempio n. 3
0
def random_test():
    """Use rtest go_find_bugs.py to randomly test RIDE api"""
    _remove_bytecode_files()
    _set_development_path()
    sys.path.insert(0, '.')
    from rtest.go_find_some_bugs import main
    dir = tempfile.mkdtemp()
    try:
        assert main(dir)
    finally:
        shutil.rmtree(dir, ignore_errors=True)
def random_test():
    """Use rtest go_find_bugs.py to randomly test RIDE api"""
    _remove_bytecode_files()
    _set_development_path()
    sys.path.insert(0, '.')
    from rtest.go_find_some_bugs import main
    dir = tempfile.mkdtemp()
    try:
        assert main(dir)
    finally:
        shutil.rmtree(dir, ignore_errors=True)
def ride():
    if HAS_RIDE:
        from robotide import main
        main(*sys.argv[1:])
    else:
        print(u"""\
Package robotframework-ride was not found. Please, install
plone.app.robotframework with proper extras, like:

    plone.app.robotframework[ride]

or

    plone.app.robotframework[ride,reload]

Remember that ride must be lauched with system python with
wxPython installed, like:

    /usr/bin/python bin/ride
""")
def ride():
    if HAS_RIDE:
        from robotide import main
        main(*sys.argv[1:])
    else:
        print(u"""\
Package robotframework-ride was not found. Please, install
plone.app.robotframework with proper extras, like:

    plone.app.robotframework[ride]

or

    plone.app.robotframework[ride,reload]

Remember that ride must be lauched with system python with
wxPython installed, like:

    /usr/bin/python bin/ride
""")
Esempio n. 7
0
def pybabel():
    # This registers our minimal robot translation extractor
    import babel.messages.extract
    babel.messages.extract.DEFAULT_MAPPING.extend([
        ('**.rst', 'plone.app.robotframework.pybabel:extract_robot'),
        ('**.robot', 'plone.app.robotframework.pybabel:extract_robot')
    ])

    # This code hides warnings for missing Sphinx-only-directives:
    from docutils.parsers.rst.directives import register_directive
    from docutils.parsers.rst.roles import register_local_role
    dummy_directive = lambda *args: []
    options = ('maxdepth', 'creates', 'numbered', 'hidden')
    setattr(dummy_directive, 'content', True)
    setattr(dummy_directive, 'options', dict([(opt, str) for opt in options]))
    register_directive('toctree', dummy_directive)
    register_directive('robotframework', dummy_directive)
    register_local_role('ref', dummy_directive)

    from babel.messages.frontend import main
    main()
def pybabel():
    # This registers our minimal robot translation extractor
    import babel.messages.extract
    babel.messages.extract.DEFAULT_MAPPING.extend([
        ('**.rst', 'plone.app.robotframework.pybabel:extract_robot'),
        ('**.robot', 'plone.app.robotframework.pybabel:extract_robot')
    ])

    # This code hides warnings for missing Sphinx-only-directives:
    from docutils.parsers.rst.directives import register_directive
    from docutils.parsers.rst.roles import register_local_role
    dummy_directive = lambda *args: []
    options = ('maxdepth', 'creates', 'numbered', 'hidden')
    setattr(dummy_directive, 'content', True)
    setattr(dummy_directive, 'options', dict([(opt, str) for opt in options]))
    register_directive('toctree', dummy_directive)
    register_directive('robotframework', dummy_directive)
    register_local_role('ref', dummy_directive)

    from babel.messages.frontend import main
    main()
Esempio n. 9
0
def generate_big_project(options):
    """Use rtest go_find_bugs.py to randomly test RIDE api"""
    _remove_bytecode_files()
    _set_development_path()
    sys.path.insert(0, '.')
    from rtest.large_scale_keyword_test import main
    _log("Test project is created into directory (option 'd'): %s" % options.dir)
    shutil.rmtree(options.dir, ignore_errors=True)
    sys.path.append(options.dir)
    try:
        assert main(options.dir, testlibs_count=int(options.libs), keyword_count=int(options.keywords),
                    testsuite_count=int(options.suites), tests_in_suite=int(options.tests),
                    resource_count=int(options.resourcefiles), resources_in_file=int(options.resources))
    finally:
        #if len(args) >= 1 and ("del" in args):
        #    shutil.rmtree(dir, ignore_errors=True)
        #else:
        _log("Not removing directory: " + options.dir)
Esempio n. 10
0
def generate_big_project(args):
    _remove_bytecode_files()
    if "--upgrade" in args or '--install' in args:
        rfgen_url = "https://raw.github.com/robotframework/Generator/master/rfgen.py"
        print "Installing/upgrading rfgen.py from github."
        f = open('rfgen.py','wb')
        f.write(urllib2.urlopen(rfgen_url).read())
        f.close()
        print "Done."
        sys.exit(0)

    _set_development_path()
    sys.path.insert(0, '.')

    try:
        from rfgen import main
        assert main(args)
    except ImportError:
        print "Error: Did not find 'rfgen' script or installation"
        print "Use 'paver generate_big_project --install'"
        sys.exit(0)
Esempio n. 11
0
def generate_big_project(args):
    _remove_bytecode_files()
    if "--upgrade" in args or '--install' in args:
        rfgen_url = "https://raw.github.com/robotframework/Generator/master/rfgen.py"
        print "Installing/upgrading rfgen.py from github."
        f = open('rfgen.py', 'wb')
        f.write(urllib2.urlopen(rfgen_url).read())
        f.close()
        print "Done."
        sys.exit(0)

    _set_development_path()
    sys.path.insert(0, '.')

    try:
        from rfgen import main
        assert main(args)
    except ImportError:
        print "Error: Did not find 'rfgen' script or installation"
        print "Use 'paver generate_big_project --install'"
        sys.exit(0)
Esempio n. 12
0
def run(args):
    """Start development version of RIDE"""
    _set_development_path()
    from robotide import main
    main(*args)
Esempio n. 13
0
def ride():
    if HAS_RIDE:
        from robotide import main
        main(*sys.argv[1:])
    else:
        print u"""\
Esempio n. 14
0
#! /usr/bin/env python

#  Copyright 2008-2012 Nokia Siemens Networks Oyj
#  
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#  
#      http://www.apache.org/licenses/LICENSE-2.0
#  
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.


import sys

from robotide import main

# Must be protected against reimporting
# As multiprocessing has an odd requirement
# and we use multiprocessing
# http://docs.python.org/library/multiprocessing.html#windows
if __name__ == '__main__':
    main(sys.argv[1:])
Esempio n. 15
0
#! /usr/bin/env python

#  Copyright 2008-2015 Nokia Solutions and Networks
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

import sys

from robotide import main

# Must be protected against reimporting
# As multiprocessing has an odd requirement
# and we use multiprocessing
# http://docs.python.org/library/multiprocessing.html#windows
if __name__ == '__main__':
    main(*sys.argv[1:])
Esempio n. 16
0
def devel(ctx, args=''):
    """Start development version of RIDE."""
    _set_development_path()
    from robotide import main
    main(*args.split(','))
Esempio n. 17
0
#! /usr/bin/env python

#  Copyright 2008-2012 Nokia Siemens Networks Oyj
#  
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#  
#      http://www.apache.org/licenses/LICENSE-2.0
#  
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.


import sys

from robotide import main

# Must be protected against reimporting
# As multiprocessing has an odd requirement
# and we use multiprocessing
# http://docs.python.org/library/multiprocessing.html#windows
if __name__ == '__main__':
    main(*sys.argv[1:])
Esempio n. 18
0
def devel(args=""):
    """Start development version of RIDE."""
    _set_development_path()
    from robotide import main

    main(*args.split(","))
Esempio n. 19
0
#-*- coding=utf-8 -*-
from robotide import main
if __name__ == "__main__":
    main()
Esempio n. 20
0
def run(args):
    """Start development version of RIDE"""
    _set_development_path()
    from robotide import main
    main(*args)
Esempio n. 21
0
def devel(ctx, args=''):
    """Start development version of RIDE."""
    _set_development_path()
    from robotide import main
    main(*args.split(','))