code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# mako/cache.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from mako import exceptions cache = None class BeakerMissing(object): def get_cache(self, name...
[ [ 1, 0, 0.0565, 0.0081, 0, 0.66, 0, 682, 0, 1, 0, 0, 682, 0, 0 ], [ 14, 0, 0.0726, 0.0081, 0, 0.66, 0.3333, 419, 1, 0, 0, 0, 0, 9, 0 ], [ 3, 0, 0.0968, 0.0242, 0, 0...
[ "from mako import exceptions", "cache = None", "class BeakerMissing(object):\n def get_cache(self, name, **kwargs):\n raise exceptions.RuntimeException(\"the Beaker package is required to use cache functionality.\")", " def get_cache(self, name, **kwargs):\n raise exceptions.RuntimeExcepti...
# mako/filters.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re, urllib, htmlentitydefs, codecs from StringIO import StringIO from mako import util xm...
[ [ 1, 0, 0.0426, 0.0053, 0, 0.66, 0, 540, 0, 4, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0479, 0.0053, 0, 0.66, 0.0435, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.0532, 0.0053, 0, ...
[ "import re, urllib, htmlentitydefs, codecs", "from StringIO import StringIO", "from mako import util", "xml_escapes = {\n '&' : '&amp;',\n '>' : '&gt;', \n '<' : '&lt;', \n '\"' : '&#34;', # also &quot; in html-only\n \"'\" : '&#39;' # also &apos; in html-only \n}", "def legacy_html_esca...
# mako/template.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the Template class, a facade for parsing, generating and executing template strings, ...
[ [ 8, 0, 0.0138, 0.0037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0185, 0.0018, 0, 0.66, 0.0909, 824, 0, 1, 0, 0, 824, 0, 0 ], [ 1, 0, 0.0203, 0.0018, 0, 0.66...
[ "\"\"\"Provides the Template class, a facade for parsing, generating and executing\ntemplate strings, as well as template runtime operations.\"\"\"", "from mako.lexer import Lexer", "from mako import runtime, util, exceptions, codegen", "import imp, os, re, shutil, stat, sys, tempfile, time, types, weakref", ...
# mako/exceptions.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """exception classes""" import traceback, sys, re from mako import util class MakoException(E...
[ [ 8, 0, 0.0228, 0.0033, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0293, 0.0033, 0, 0.66, 0.0769, 423, 0, 3, 0, 0, 423, 0, 0 ], [ 1, 0, 0.0326, 0.0033, 0, 0.66...
[ "\"\"\"exception classes\"\"\"", "import traceback, sys, re", "from mako import util", "class MakoException(Exception):\n pass", "class RuntimeException(MakoException):\n pass", "def _format_filepos(lineno, pos, filename):\n if filename is None:\n return \" at line: %d char: %d\" % (lineno...
# mako/ast.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for analyzing expressions and blocks of Python code, as well as generating Python from A...
[ [ 8, 0, 0.0524, 0.014, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0699, 0.007, 0, 0.66, 0.1429, 682, 0, 3, 0, 0, 682, 0, 0 ], [ 1, 0, 0.0769, 0.007, 0, 0.66, ...
[ "\"\"\"utilities for analyzing expressions and blocks of Python \ncode, as well as generating Python from AST nodes\"\"\"", "from mako import exceptions, pyparser, util", "import re", "class PythonCode(object):\n \"\"\"represents information about a string containing Python code\"\"\"\n def __init__(sel...
# ext/preprocessors.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """preprocessing functions, used with the 'preprocessor' argument on Template, TemplateLooku...
[ [ 8, 0, 0.375, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.05, 0, 0.66, 0.5, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 2, 0, 0.775, 0.4, 0, 0.66, 1, 722...
[ "\"\"\"preprocessing functions, used with the 'preprocessor' \nargument on Template, TemplateLookup\"\"\"", "import re", "def convert_comments(text):\n \"\"\"preprocess old style comments.\n \n example:\n \n from mako.ext.preprocessors import convert_comments\n t = Template(..., preprocessor=preproc...
# ext/pygmentplugin.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re try: set except NameError: from sets import Set as set from pygments.lexer...
[ [ 1, 0, 0.0654, 0.0093, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 7, 0, 0.0888, 0.0374, 0, 0.66, 0.0909, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 8, 1, 0.0841, 0.0093, 1, 0.48...
[ "import re", "try:\n set\nexcept NameError:\n from sets import Set as set", " set", " from sets import Set as set", "from pygments.lexers.web import \\\n HtmlLexer, XmlLexer, JavascriptLexer, CssLexer", "from pygments.lexers.agile import PythonLexer", "from pygments.lexer import Lexer, D...
# ext/turbogears.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re, inspect from mako.lookup import TemplateLookup from mako.template import Template cl...
[ [ 1, 0, 0.125, 0.0179, 0, 0.66, 0, 540, 0, 2, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1429, 0.0179, 0, 0.66, 0.3333, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 1, 0, 0.1607, 0.0179, 0, 0...
[ "import re, inspect", "from mako.lookup import TemplateLookup", "from mako.template import Template", "class TGPlugin(object):\n \"\"\"TurboGears compatible Template Plugin.\"\"\"\n\n def __init__(self, extra_vars_func=None, options=None, extension='mak'):\n self.extra_vars_func = extra_vars_func...
# ext/babelplugin.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """gettext message extraction via Babel: http://babel.edgewall.org/""" from StringIO import Str...
[ [ 8, 0, 0.053, 0.0076, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0606, 0.0076, 0, 0.66, 0.1667, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.0758, 0.0076, 0, 0.66,...
[ "\"\"\"gettext message extraction via Babel: http://babel.edgewall.org/\"\"\"", "from StringIO import StringIO", "from babel.messages.extract import extract_python", "from mako import lexer, parsetree", "def extract(fileobj, keywords, comment_tags, options):\n \"\"\"Extract messages from Mako templates.\...
# ext/autohandler.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """adds autohandler functionality to Mako templates. requires that the TemplateLookup class is...
[ [ 8, 0, 0.2538, 0.3077, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4308, 0.0154, 0, 0.66, 0.3333, 204, 0, 3, 0, 0, 204, 0, 0 ], [ 2, 0, 0.6615, 0.4154, 0, 0.66...
[ "\"\"\"adds autohandler functionality to Mako templates.\n\nrequires that the TemplateLookup class is used with templates.\n\nusage:\n\n<%!\n from mako.ext.autohandler import autohandler", "import posixpath, os, re", "def autohandler(template, context, name='autohandler'):\n lookup = context.lookup\n _...
# mako/__init__.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __version__ = '0.5.0'
[ [ 14, 0, 0.8889, 0.1111, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = '0.5.0'" ]
# mako/parsetree.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """defines the parse tree components for Mako templates.""" from mako import exceptions, ast, u...
[ [ 8, 0, 0.0124, 0.0018, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0159, 0.0018, 0, 0.66, 0.05, 682, 0, 4, 0, 0, 682, 0, 0 ], [ 1, 0, 0.0177, 0.0018, 0, 0.66, ...
[ "\"\"\"defines the parse tree components for Mako templates.\"\"\"", "from mako import exceptions, ast, util, filters", "import re", "class Node(object):\n \"\"\"base class for a Node in the parse tree.\"\"\"\n def __init__(self, source, lineno, pos, filename):\n self.source = source\n sel...
# mako/_ast_util.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ ast ~~~ The `ast` module helps Python applications to process trees of the Pyth...
[ [ 8, 0, 0.0232, 0.031, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0393, 0.0012, 0, 0.66, 0.0385, 709, 0, 1, 0, 0, 709, 0, 0 ], [ 14, 0, 0.0447, 0.0048, 0, 0.66...
[ "\"\"\"\n ast\n ~~~\n\n The `ast` module helps Python applications to process trees of the Python\n abstract syntax grammar. The abstract syntax itself might change with\n each Python release; this module helps to find out programmatically what\n the current grammar looks like and allows modifica...
# mako/lookup.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import os, stat, posixpath, re from mako import exceptions, util from mako.template import Template...
[ [ 1, 0, 0.0211, 0.003, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0242, 0.003, 0, 0.66, 0.2, 682, 0, 2, 0, 0, 682, 0, 0 ], [ 1, 0, 0.0272, 0.003, 0, 0.66, ...
[ "import os, stat, posixpath, re", "from mako import exceptions, util", "from mako.template import Template", "try:\n import threading\nexcept:\n import dummy_threading as threading", " import threading", " import dummy_threading as threading", "class TemplateCollection(object):\n \"\"\"Re...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import os import web import uuid from mako.lookup import TemplateLookup from mako import exceptions __author__ = 'Michael Liao' class emptyobject(object): def __getattr__(self, attr): return '' def __setattr__(self, attr, value): ...
[ [ 1, 0, 0.037, 0.0093, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0556, 0.0093, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0648, 0.0093, 0, 0...
[ "import logging", "import os", "import web", "import uuid", "from mako.lookup import TemplateLookup", "from mako import exceptions", "__author__ = 'Michael Liao'", "class emptyobject(object):\n def __getattr__(self, attr):\n return ''\n\n def __setattr__(self, attr, value):\n pass"...
#!/usr/bin/env python # -*- coding: utf-8 -*- APP_KEY = 'hidden' APP_SECRET = 'hidden'
[ [ 14, 0, 0.8, 0.2, 0, 0.66, 0, 912, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 1, 0.2, 0, 0.66, 1, 675, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "APP_KEY = 'hidden'", "APP_SECRET = 'hidden'" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '1.04' __author__ = 'Liao Xuefeng (askxuefeng@gmail.com)' ''' Python client SDK for sina weibo API using OAuth 2. ''' try: import json except ImportError: import simplejson as json import time import urllib import urllib2 import logging def _obj_ho...
[ [ 14, 0, 0.0201, 0.005, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0251, 0.005, 0, 0.66, 0.0435, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 8, 0, 0.0402, 0.0151, 0, 0.66...
[ "__version__ = '1.04'", "__author__ = 'Liao Xuefeng (askxuefeng@gmail.com)'", "'''\nPython client SDK for sina weibo API using OAuth 2.\n'''", "try:\n import json\nexcept ImportError:\n import simplejson as json", " import json", " import simplejson as json", "import time", "import urllib"...
#!/usr/bin/env python import urllib2 import shutil import os from os.path import join, exists, dirname, abspath from glob import glob from subprocess import call from zipfile import ZipFile JASMINE_REPORTER_URL='https://github.com/larrymyers/jasmine-reporters/zipball/0.2.1' BASE = abspath(dirname(__file__)) REPORT_DI...
[ [ 1, 0, 0.0385, 0.0192, 0, 0.66, 0, 345, 0, 1, 0, 0, 345, 0, 0 ], [ 1, 0, 0.0577, 0.0192, 0, 0.66, 0.0625, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0769, 0.0192, 0, ...
[ "import urllib2", "import shutil", "import os", "from os.path import join, exists, dirname, abspath", "from glob import glob", "from subprocess import call", "from zipfile import ZipFile", "JASMINE_REPORTER_URL='https://github.com/larrymyers/jasmine-reporters/zipball/0.2.1'", "BASE = abspath(dirname...
import os THIS_PATH = os.path.dirname(__file__) GOLDEN_OUTPUT = os.path.join(THIS_PATH, 'golden_suite', 'output.xml') GOLDEN_OUTPUT2 = os.path.join(THIS_PATH, 'golden_suite', 'output2.xml') GOLDEN_JS = os.path.join(THIS_PATH, 'golden_suite', 'expected.js')
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.4286, 0.1429, 0, 0.66, 0.25, 832, 3, 1, 0, 0, 959, 10, 1 ], [ 14, 0, 0.5714, 0.1429, 0, ...
[ "import os", "THIS_PATH = os.path.dirname(__file__)", "GOLDEN_OUTPUT = os.path.join(THIS_PATH, 'golden_suite', 'output.xml')", "GOLDEN_OUTPUT2 = os.path.join(THIS_PATH, 'golden_suite', 'output2.xml')", "GOLDEN_JS = os.path.join(THIS_PATH, 'golden_suite', 'expected.js')" ]
__author__ = 'janne'
[ [ 14, 0, 1, 1, 0, 0.66, 0, 777, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__author__ = 'janne'" ]
#!/usr/bin/env python import fileinput from os.path import join, dirname, abspath import sys import os BASEDIR = dirname(abspath(__file__)) OUTPUT = join(BASEDIR, 'output.xml') sys.path.insert(0, join(BASEDIR, '..', '..', '..', '..', 'src')) import robot from robot.conf.settings import RebotSettings from robot.repo...
[ [ 1, 0, 0.0526, 0.0175, 0, 0.66, 0, 286, 0, 1, 0, 0, 286, 0, 0 ], [ 1, 0, 0.0702, 0.0175, 0, 0.66, 0.0667, 79, 0, 3, 0, 0, 79, 0, 0 ], [ 1, 0, 0.0877, 0.0175, 0, 0....
[ "import fileinput", "from os.path import join, dirname, abspath", "import sys", "import os", "BASEDIR = dirname(abspath(__file__))", "OUTPUT = join(BASEDIR, 'output.xml')", "sys.path.insert(0, join(BASEDIR, '..', '..', '..', '..', 'src'))", "import robot", "from robot.conf.settings import RebotSetti...
#!/usr/bin/env python import sys import os from os.path import join, dirname from distutils.core import setup execfile(join(dirname(__file__), 'src', 'robot', 'version.py')) # Maximum width in Windows installer seems to be 70 characters -------| DESCRIPTION = """ Robot Framework is a generic test automation framewor...
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.6, 0.2, 0, 0.66, 0.6667, ...
[ "import sys", "import os", "from os.path import join, dirname", "from distutils.core import setup" ]
#!/usr/bin/env python """A script for running Robot Framework's acceptance tests. Usage: run_atests.py interpreter [options] datasource(s) Data sources are paths to directories or files under `robot` folder. Available options are the same that can be used with Robot Framework. See its help (e.g. `pybot --help`) fo...
[ [ 8, 0, 0.1034, 0.1638, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1983, 0.0086, 0, 0.66, 0.0714, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2069, 0.0086, 0, 0.66...
[ "\"\"\"A script for running Robot Framework's acceptance tests.\n\nUsage: run_atests.py interpreter [options] datasource(s)\n\nData sources are paths to directories or files under `robot` folder.\n\nAvailable options are the same that can be used with Robot Framework.\nSee its help (e.g. `pybot --help`) for more i...
import subprocess import os import signal import ctypes class ProcessManager(object): def __init__(self): self._process = None self._stdout = None self._stderr = None def start_process(self, *args): self._process = subprocess.Popen(args, stderr=subprocess.PIPE, ...
[ [ 1, 0, 0.0137, 0.0137, 0, 0.66, 0, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0274, 0.0137, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0411, 0.0137, 0, 0....
[ "import subprocess", "import os", "import signal", "import ctypes", "class ProcessManager(object):\n\n def __init__(self):\n self._process = None\n self._stdout = None\n self._stderr = None\n\n def start_process(self, *args):", " def __init__(self):\n self._process = N...
from __future__ import with_statement import os import re from os.path import abspath, dirname, join from subprocess import call, STDOUT import tempfile from robot.utils.asserts import assert_equals, assert_true from robot.utils import decode_output ROBOT_SRC = join(dirname(abspath(__file__)), '..', '..', '..', 'sr...
[ [ 1, 0, 0.0108, 0.0108, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0323, 0.0108, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.043, 0.0108, 0, 0...
[ "from __future__ import with_statement", "import os", "import re", "from os.path import abspath, dirname, join", "from subprocess import call, STDOUT", "import tempfile", "from robot.utils.asserts import assert_equals, assert_true", "from robot.utils import decode_output", "ROBOT_SRC = join(dirname(...
import json import os import pprint import tempfile from os.path import join, dirname, abspath from subprocess import call, STDOUT from robot.api import logger from robot.utils import decode_output ROBOT_SRC = join(dirname(abspath(__file__)), '..', '..', '..', 'src') class LibDocLib(object): def __init__(self, ...
[ [ 1, 0, 0.0244, 0.0244, 0, 0.66, 0, 463, 0, 1, 0, 0, 463, 0, 0 ], [ 1, 0, 0.0488, 0.0244, 0, 0.66, 0.1111, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0732, 0.0244, 0, ...
[ "import json", "import os", "import pprint", "import tempfile", "from os.path import join, dirname, abspath", "from subprocess import call, STDOUT", "from robot.api import logger", "from robot.utils import decode_output", "ROBOT_SRC = join(dirname(abspath(__file__)), '..', '..', '..', 'src')", "cl...
from __future__ import with_statement import os from robot.utils import utf8open def output_should_have_correct_line_separators(path): with utf8open(path) as infile: content = infile.read() content = content.replace(os.linesep, '') extra_r = content.count('\r') extra_n = content.count('\n') ...
[ [ 1, 0, 0.0588, 0.0588, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1176, 0.0588, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2353, 0.0588, 0, ...
[ "from __future__ import with_statement", "import os", "from robot.utils import utf8open", "def output_should_have_correct_line_separators(path):\n with utf8open(path) as infile:\n content = infile.read()\n content = content.replace(os.linesep, '')\n extra_r = content.count('\\r')\n extra_n ...
from __future__ import with_statement from robot.api import logger class WrongStat(AssertionError): ROBOT_CONTINUE_ON_FAILURE = True def get_total_stats(path): return get_all_stats(path)[0] def get_tag_stats(path): return get_all_stats(path)[1] def get_suite_stats(path): return get_all_stats(path)...
[ [ 1, 0, 0.0238, 0.0238, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0476, 0.0238, 0, 0.66, 0.1111, 855, 0, 1, 0, 0, 855, 0, 0 ], [ 3, 0, 0.131, 0.0476, 0, 0...
[ "from __future__ import with_statement", "from robot.api import logger", "class WrongStat(AssertionError):\n ROBOT_CONTINUE_ON_FAILURE = True", " ROBOT_CONTINUE_ON_FAILURE = True", "def get_total_stats(path):\n return get_all_stats(path)[0]", " return get_all_stats(path)[0]", "def get_tag_st...
from robot.libraries.BuiltIn import BuiltIn BIN = BuiltIn() def start_keyword(*args): if BIN.get_variables()['${TESTNAME}'] == 'Listener Using BuiltIn': BIN.set_test_variable('${SET BY LISTENER}', 'quux')
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 588, 0, 1, 0, 0, 588, 0, 0 ], [ 14, 0, 0.3333, 0.1111, 0, 0.66, 0.5, 831, 3, 0, 0, 0, 961, 10, 1 ], [ 2, 0, 0.7778, 0.3333, 0, 0...
[ "from robot.libraries.BuiltIn import BuiltIn", "BIN = BuiltIn()", "def start_keyword(*args):\n if BIN.get_variables()['${TESTNAME}'] == 'Listener Using BuiltIn':\n BIN.set_test_variable('${SET BY LISTENER}', 'quux')", " if BIN.get_variables()['${TESTNAME}'] == 'Listener Using BuiltIn':\n B...
from __future__ import with_statement from os.path import abspath, dirname, join from fnmatch import fnmatchcase from operator import eq from robot.api import logger CURDIR = dirname(abspath(__file__)) def verify_output(actual, expected): actual = _read_file(actual, 'Actual') expected = _read_file(join(CURD...
[ [ 1, 0, 0.0357, 0.0357, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0714, 0.0357, 0, 0.66, 0.1429, 79, 0, 3, 0, 0, 79, 0, 0 ], [ 1, 0, 0.1071, 0.0357, 0, 0....
[ "from __future__ import with_statement", "from os.path import abspath, dirname, join", "from fnmatch import fnmatchcase", "from operator import eq", "from robot.api import logger", "CURDIR = dirname(abspath(__file__))", "def verify_output(actual, expected):\n actual = _read_file(actual, 'Actual')\n ...
import os import time class ListenAll: ROBOT_LISTENER_API_VERSION = '2' def __init__(self, *path): path = ':'.join(path) if path else self._get_default_path() self.outfile = open(path, 'w') def _get_default_path(self): return os.path.join(os.getenv('TEMPDIR'), 'listen_all.txt') ...
[ [ 1, 0, 0.0125, 0.0125, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.025, 0.0125, 0, 0.66, 0.5, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 3, 0, 0.5312, 0.95, 0, 0.66, ...
[ "import os", "import time", "class ListenAll:\n ROBOT_LISTENER_API_VERSION = '2'\n\n def __init__(self, *path):\n path = ':'.join(path) if path else self._get_default_path()\n self.outfile = open(path, 'w')\n\n def _get_default_path(self):", " ROBOT_LISTENER_API_VERSION = '2'", " ...
import os class OldListenAll: def __init__(self, *path): if not path: path = os.path.join(os.getenv('TEMPDIR'), 'listen_all.txt') else: path = ':'.join(path) self.outfile = open(path, 'w') def start_suite(self, name, doc): self.outfile.write("SUITE STA...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 3, 0, 0.537, 0.9444, 0, 0.66, 1, 555, 0, 13, 0, 0, 0, 0, 22 ], [ 2, 1, 0.1574, 0.1111, 1, 0.64, ...
[ "import os", "class OldListenAll:\n\n def __init__(self, *path):\n if not path:\n path = os.path.join(os.getenv('TEMPDIR'), 'listen_all.txt')\n else:\n path = ':'.join(path)\n self.outfile = open(path, 'w')", " def __init__(self, *path):\n if not path:\n ...
import os outpath = os.path.join(os.getenv('TEMPDIR'), 'listen_by_module.txt') OUTFILE = open(outpath, 'w') ROBOT_LISTENER_API_VERSION = 2 def start_suite(name, attrs): metastr = ' '.join('%s: %s' % (k, v) for k, v in attrs['metadata'].items()) OUTFILE.write("SUITE START: %s '%s' [%s]\n" % ...
[ [ 1, 0, 0.0159, 0.0159, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0476, 0.0159, 0, 0.66, 0.0588, 74, 3, 2, 0, 0, 933, 10, 2 ], [ 14, 0, 0.0635, 0.0159, 0, ...
[ "import os", "outpath = os.path.join(os.getenv('TEMPDIR'), 'listen_by_module.txt')", "OUTFILE = open(outpath, 'w')", "ROBOT_LISTENER_API_VERSION = 2", "def start_suite(name, attrs):\n metastr = ' '.join('%s: %s' % (k, v) for k, v in attrs['metadata'].items())\n OUTFILE.write(\"SUITE START: %s '%s' [%s...
import os class ListenSome: def __init__(self): outpath = os.path.join(os.getenv('TEMPDIR'), 'listen_some.txt') self.outfile = open(outpath, 'w') def startTest(self, name, doc, tags): self.outfile.write(name + '\n') def endSuite(self, stat, msg): self.outfile.write(msg +...
[ [ 1, 0, 0.0286, 0.0286, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 3, 0, 0.3, 0.4, 0, 0.66, 0.3333, 502, 0, 4, 0, 0, 0, 0, 6 ], [ 2, 1, 0.2, 0.0857, 1, 0.86, 0...
[ "import os", "class ListenSome:\n\n def __init__(self):\n outpath = os.path.join(os.getenv('TEMPDIR'), 'listen_some.txt')\n self.outfile = open(outpath, 'w')\n\n def startTest(self, name, doc, tags):\n self.outfile.write(name + '\\n')", " def __init__(self):\n outpath = os.p...
import os from robot.libraries.BuiltIn import BuiltIn class ListenSome: ROBOT_LISTENER_API_VERSION = '2' def __init__(self): outpath = os.path.join(os.getenv('TEMPDIR'), 'listen_some.txt') self.outfile = open(outpath, 'w') def startTest(self, name, attrs): self.outfile.write(nam...
[ [ 1, 0, 0.0087, 0.0087, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0261, 0.0087, 0, 0.66, 0.1429, 588, 0, 1, 0, 0, 588, 0, 0 ], [ 3, 0, 0.113, 0.1304, 0, 0...
[ "import os", "from robot.libraries.BuiltIn import BuiltIn", "class ListenSome:\n ROBOT_LISTENER_API_VERSION = '2'\n\n def __init__(self):\n outpath = os.path.join(os.getenv('TEMPDIR'), 'listen_some.txt')\n self.outfile = open(outpath, 'w')\n\n def startTest(self, name, attrs):", " RO...
import os outpath = os.path.join(os.getenv('TEMPDIR'), 'listen_by_module.txt') OUTFILE = open(outpath, 'w') def start_suite(name, doc): OUTFILE.write("SUITE START: %s '%s'\n" % (name, doc)) def start_test(name, doc, tags): tags = [ str(tag) for tag in tags ] OUTFILE.write("TEST START: %s '%s' %s\n" % (n...
[ [ 1, 0, 0.0208, 0.0208, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0625, 0.0208, 0, 0.66, 0.0714, 74, 3, 2, 0, 0, 933, 10, 2 ], [ 14, 0, 0.0833, 0.0208, 0, ...
[ "import os", "outpath = os.path.join(os.getenv('TEMPDIR'), 'listen_by_module.txt')", "OUTFILE = open(outpath, 'w')", "def start_suite(name, doc):\n OUTFILE.write(\"SUITE START: %s '%s'\\n\" % (name, doc))", " OUTFILE.write(\"SUITE START: %s '%s'\\n\" % (name, doc))", "def start_test(name, doc, tags)...
import os ROBOT_LISTENER_API_VERSION = '2' OUTFILE = open(os.path.join(os.getenv('TEMPDIR'), 'listener_attrs.txt'), 'w') START_ATTRS = 'doc starttime ' END_ATTRS = START_ATTRS + 'endtime elapsedtime status ' EXPECTED_TYPES = {'elapsedtime': (int, long), 'tags': list, 'args': list, 'metadata': dict, ...
[ [ 1, 0, 0.0192, 0.0192, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0577, 0.0192, 0, 0.66, 0.0769, 63, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0962, 0.0192, 0, 0...
[ "import os", "ROBOT_LISTENER_API_VERSION = '2'", "OUTFILE = open(os.path.join(os.getenv('TEMPDIR'), 'listener_attrs.txt'), 'w')", "START_ATTRS = 'doc starttime '", "END_ATTRS = START_ATTRS + 'endtime elapsedtime status '", "EXPECTED_TYPES = {'elapsedtime': (int, long), 'tags': list, 'args': list,\n ...
def get_variables(*args): return { 'PPATH_VARFILE_2' : ' '.join(args), 'LIST__PPATH_VARFILE_2' : args }
[ [ 2, 0, 0.5, 0.75, 0, 0.66, 0, 461, 0, 1, 1, 0, 0, 0, 1 ], [ 13, 1, 0.625, 0.5, 1, 0.76, 0, 0, 0, 0, 0, 0, 0, 6, 1 ] ]
[ "def get_variables(*args):\n return { 'PPATH_VARFILE_2' : ' '.join(args),\n 'LIST__PPATH_VARFILE_2' : args }", " return { 'PPATH_VARFILE_2' : ' '.join(args),\n 'LIST__PPATH_VARFILE_2' : args }" ]
PPATH_VARFILE = "Variable from variable file in PYTHONPATH"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 799, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "PPATH_VARFILE = \"Variable from variable file in PYTHONPATH\"" ]
list1 = [1, 2, 3, 4, 'foo', 'bar'] dictionary1 = {'a': 1} dictionary2 = {'a': 1, 'b': 2}
[ [ 14, 0, 0.3333, 0.3333, 0, 0.66, 0, 150, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.6667, 0.3333, 0, 0.66, 0.5, 355, 0, 0, 0, 0, 0, 6, 0 ], [ 14, 0, 1, 0.3333, 0, 0.66, ...
[ "list1 = [1, 2, 3, 4, 'foo', 'bar']", "dictionary1 = {'a': 1}", "dictionary2 = {'a': 1, 'b': 2}" ]
class TraceLogArgsLibrary(object): def only_mandatory(self, mand1, mand2): pass def mandatory_and_default(self, mand, default="default value"): pass def multiple_default_values(self, a=1, a2=2, a3=3, a4=4): pass def mandatory_and_varargs(self, mand, *varargs): pass ...
[ [ 3, 0, 0.3333, 0.6333, 0, 0.66, 0, 552, 0, 6, 0, 0, 186, 0, 2 ], [ 2, 1, 0.1167, 0.0667, 1, 0.8, 0, 124, 0, 3, 0, 0, 0, 0, 0 ], [ 2, 1, 0.2167, 0.0667, 1, 0.8, ...
[ "class TraceLogArgsLibrary(object):\n\n def only_mandatory(self, mand1, mand2):\n pass\n\n def mandatory_and_default(self, mand, default=\"default value\"):\n pass", " def only_mandatory(self, mand1, mand2):\n pass", " def mandatory_and_default(self, mand, default=\"default valu...
class FailUntilSucceeds: ROBOT_LIBRARY_SCOPE = 'TESTCASE' def __init__(self, times_to_fail=0): self.times_to_fail = int(times_to_fail) def fail_until_retried_often_enough(self, message="Hello"): self.times_to_fail -= 1 if self.times_to_fail >= 0: raise Exce...
[ [ 3, 0, 0.5417, 1, 0, 0.66, 0, 243, 0, 2, 0, 0, 0, 0, 2 ], [ 14, 1, 0.25, 0.0833, 1, 0.67, 0, 305, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 1, 0.4583, 0.1667, 1, 0.67, 0.5, ...
[ "class FailUntilSucceeds:\n \n ROBOT_LIBRARY_SCOPE = 'TESTCASE'\n \n def __init__(self, times_to_fail=0):\n self.times_to_fail = int(times_to_fail)\n \n def fail_until_retried_often_enough(self, message=\"Hello\"):", " ROBOT_LIBRARY_SCOPE = 'TESTCASE'", " def __init__(self, times_...
import exceptions class ObjectToReturn: def __init__(self, name): self.name = name def __str__(self): return self.name def exception(self, name, msg=""): exception = getattr(exceptions, name) raise exception, msg
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 63, 0, 1, 0, 0, 63, 0, 0 ], [ 3, 0, 0.625, 0.8333, 0, 0.66, 1, 601, 0, 3, 0, 0, 0, 0, 1 ], [ 2, 1, 0.4583, 0.1667, 1, 0.73, ...
[ "import exceptions", "class ObjectToReturn:\n \n def __init__(self, name):\n self.name = name\n\n def __str__(self):\n return self.name", " def __init__(self, name):\n self.name = name", " self.name = name", " def __str__(self):\n return self.name", " ...
class SameNamesAsInBuiltIn: def noop(self): """Using this keyword without libname causes an error"""
[ [ 3, 0, 0.625, 1, 0, 0.66, 0, 82, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.875, 0.5, 1, 0.56, 0, 907, 0, 1, 0, 0, 0, 0, 0 ], [ 8, 2, 1, 0.25, 2, 0.93, 0, 0, 1, ...
[ "class SameNamesAsInBuiltIn:\n \n def noop(self):\n \"\"\"Using this keyword without libname causes an error\"\"\"", " def noop(self):\n \"\"\"Using this keyword without libname causes an error\"\"\"", " \"\"\"Using this keyword without libname causes an error\"\"\"" ]
from robot.libraries.BuiltIn import BuiltIn class NamespaceUsingLibrary(object): def __init__(self): self._importing_suite = BuiltIn().get_variable_value('${SUITE NAME}') self._easter = BuiltIn().get_library_instance('Easter') def get_importing_suite(self): return self._importing_suit...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 588, 0, 1, 0, 0, 588, 0, 0 ], [ 3, 0, 0.6154, 0.8462, 0, 0.66, 1, 35, 0, 3, 0, 0, 186, 0, 4 ], [ 2, 1, 0.4615, 0.2308, 1, 0.9, ...
[ "from robot.libraries.BuiltIn import BuiltIn", "class NamespaceUsingLibrary(object):\n\n def __init__(self):\n self._importing_suite = BuiltIn().get_variable_value('${SUITE NAME}')\n self._easter = BuiltIn().get_library_instance('Easter')\n\n def get_importing_suite(self):\n return self...
class ZipLib: def kw_from_zip(self, arg): print '*INFO*', arg return arg * 2
[ [ 3, 0, 0.4286, 0.7143, 0, 0.66, 0, 240, 0, 1, 0, 0, 0, 0, 1 ], [ 2, 1, 0.5714, 0.4286, 1, 0.93, 0, 374, 0, 2, 1, 0, 0, 0, 1 ], [ 8, 2, 0.5714, 0.1429, 2, 0.92, ...
[ "class ZipLib:\n\n\tdef kw_from_zip(self, arg):\n\t\tprint('*INFO*', arg)\n\t\treturn arg * 2", "\tdef kw_from_zip(self, arg):\n\t\tprint('*INFO*', arg)\n\t\treturn arg * 2", "\t\tprint('*INFO*', arg)", "\t\treturn arg * 2" ]
class PythonVarArgsConstructor: def __init__(self, mandatory, *varargs): self.mandatory = mandatory self.varargs = varargs def get_args(self): return self.mandatory, ' '.join(self.varargs)
[ [ 3, 0, 0.5, 0.8889, 0, 0.66, 0, 282, 0, 2, 0, 0, 0, 0, 1 ], [ 2, 1, 0.4444, 0.3333, 1, 0.63, 0, 555, 0, 3, 0, 0, 0, 0, 0 ], [ 14, 2, 0.4444, 0.1111, 2, 0.35, 0...
[ "class PythonVarArgsConstructor:\n \n def __init__(self, mandatory, *varargs):\n self.mandatory = mandatory\n self.varargs = varargs\n\n def get_args(self):\n return self.mandatory, ' '.join(self.varargs)", " def __init__(self, mandatory, *varargs):\n self.mandatory = manda...
import ExampleJavaLibrary import DefaultArgs class ExtendJavaLib(ExampleJavaLibrary): def kw_in_java_extender(self, arg): return arg*2 def javaSleep(self, secs): raise Exception('Overridden kw executed!') def using_method_from_java_parent(self): self.divByZero() class ExtendJa...
[ [ 1, 0, 0.027, 0.027, 0, 0.66, 0, 716, 0, 1, 0, 0, 716, 0, 0 ], [ 1, 0, 0.0541, 0.027, 0, 0.66, 0.2, 96, 0, 1, 0, 0, 96, 0, 0 ], [ 3, 0, 0.2568, 0.2703, 0, 0.66, ...
[ "import ExampleJavaLibrary", "import DefaultArgs", "class ExtendJavaLib(ExampleJavaLibrary):\n\n def kw_in_java_extender(self, arg):\n return arg*2\n\n def javaSleep(self, secs):\n raise Exception('Overridden kw executed!')", " def kw_in_java_extender(self, arg):\n return arg*2",...
class ArgumentsPython: # method docs are used in unit tests as expected min and max args def a_0(self): """(0,0)""" return 'a_0' def a_1(self, arg): """(1,1)""" return 'a_1: ' + arg def a_3(self, arg1, arg2, arg3): """(3,3)""" return ' ...
[ [ 3, 0, 0.5, 0.9722, 0, 0.66, 0, 360, 0, 8, 0, 0, 0, 0, 8 ], [ 2, 1, 0.1667, 0.0833, 1, 0.25, 0, 653, 0, 1, 1, 0, 0, 0, 0 ], [ 8, 2, 0.1667, 0.0278, 2, 0.12, 0,...
[ "class ArgumentsPython:\n \n # method docs are used in unit tests as expected min and max args\n \n def a_0(self):\n \"\"\"(0,0)\"\"\"\n return 'a_0'", " def a_0(self):\n \"\"\"(0,0)\"\"\"\n return 'a_0'", " \"\"\"(0,0)\"\"\"", " return 'a_0'", " d...
from robot import utils class RunKeywordLibrary: ROBOT_LIBRARY_SCOPE = 'TESTCASE' def __init__(self): self.kw_names = ['Run Keyword That Passes', 'Run Keyword That Fails'] def get_keyword_names(self): return self.kw_names def run_keyword(self, name, args): try: m...
[ [ 1, 0, 0.0244, 0.0244, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.3902, 0.6098, 0, 0.66, 0.3333, 741, 0, 5, 0, 0, 0, 0, 8 ], [ 14, 1, 0.122, 0.0244, 1, 0....
[ "from robot import utils", "class RunKeywordLibrary:\n ROBOT_LIBRARY_SCOPE = 'TESTCASE'\n\n def __init__(self):\n self.kw_names = ['Run Keyword That Passes', 'Run Keyword That Fails']\n\n def get_keyword_names(self):\n return self.kw_names", " ROBOT_LIBRARY_SCOPE = 'TESTCASE'", " ...
def keyword_from_deeper_submodule(): return 'hi again' class Sub: def keyword_from_class_in_deeper_submodule(self): return 'bye'
[ [ 2, 0, 0.1667, 0.2222, 0, 0.66, 0, 11, 0, 0, 1, 0, 0, 0, 0 ], [ 13, 1, 0.2222, 0.1111, 1, 0.99, 0, 0, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.7222, 0.4444, 0, 0.66, 1...
[ "def keyword_from_deeper_submodule():\n return 'hi again'", " return 'hi again'", "class Sub:\n\n def keyword_from_class_in_deeper_submodule(self):\n return 'bye'", " def keyword_from_class_in_deeper_submodule(self):\n return 'bye'", " return 'bye'" ]
attribute = 42
[ [ 14, 0, 1, 1, 0, 0.66, 0, 355, 1, 0, 0, 0, 0, 1, 0 ] ]
[ "attribute = 42" ]
library = "It should be OK to have an attribute with same name as the module" def keyword_from_submodule(arg='World'): return "Hello, %s!" % arg
[ [ 14, 0, 0.2, 0.2, 0, 0.66, 0, 860, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.9, 0.4, 0, 0.66, 1, 962, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 1, 1, 0.2, 1, 0.05, 0, 0, 4, ...
[ "library = \"It should be OK to have an attribute with same name as the module\"", "def keyword_from_submodule(arg='World'):\n return \"Hello, %s!\" % arg", " return \"Hello, %s!\" % arg" ]
some_string = 'Hello, World!' class _SomeObject: pass some_object = _SomeObject()
[ [ 14, 0, 0.1667, 0.1667, 0, 0.66, 0, 913, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.5833, 0.3333, 0, 0.66, 0.5, 122, 0, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 1, 0.1667, 0, 0.66, ...
[ "some_string = 'Hello, World!'", "class _SomeObject:\n pass", "some_object = _SomeObject()" ]
class KwargsLibrary(object): def __init__(self, arg1=None, arg2=None, **kws): self.arg1 = arg1 self.arg2 = arg2 self.kws = kws def check_init_arguments(self, exp_arg1, exp_arg2, **kws): if self.arg1 != exp_arg1 or self.arg2 != exp_arg2 or kws != self.kws: raise Asse...
[ [ 3, 0, 0.5192, 1, 0, 0.66, 0, 328, 0, 7, 0, 0, 186, 0, 2 ], [ 2, 1, 0.1731, 0.1538, 1, 0.88, 0, 555, 0, 4, 0, 0, 0, 0, 0 ], [ 14, 2, 0.1538, 0.0385, 2, 0.79, 0...
[ "class KwargsLibrary(object):\n\n def __init__(self, arg1=None, arg2=None, **kws):\n self.arg1 = arg1\n self.arg2 = arg2\n self.kws = kws\n\n def check_init_arguments(self, exp_arg1, exp_arg2, **kws):", " def __init__(self, arg1=None, arg2=None, **kws):\n self.arg1 = arg1\n ...
class ParameterLibrary: def __init__(self, host='localhost', port='8080'): self.host = host self.port = port def parameters(self): return self.host, self.port
[ [ 3, 0, 0.5625, 1, 0, 0.66, 0, 341, 0, 2, 0, 0, 0, 0, 0 ], [ 2, 1, 0.5, 0.375, 1, 0.01, 0, 555, 0, 3, 0, 0, 0, 0, 0 ], [ 14, 2, 0.5, 0.125, 2, 0.56, 0, 445,...
[ "class ParameterLibrary:\n \n def __init__(self, host='localhost', port='8080'):\n self.host = host\n self.port = port\n \n def parameters(self):\n return self.host, self.port", " def __init__(self, host='localhost', port='8080'):\n self.host = host\n self.por...
from robot import utils def passing_handler(*args): for arg in args: print arg, return ', '.join(args) def failing_handler(*args): if len(args) == 0: msg = 'Failure' else: msg = 'Failure: %s' % ' '.join(args) raise AssertionError(msg) class GetKeywordNamesLibrary: ...
[ [ 1, 0, 0.027, 0.027, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 2, 0, 0.1486, 0.1081, 0, 0.66, 0.3333, 44, 0, 1, 1, 0, 0, 0, 2 ], [ 6, 1, 0.1486, 0.0541, 1, 0.16,...
[ "from robot import utils", "def passing_handler(*args):\n for arg in args:\n print(arg,)\n return ', '.join(args)", " for arg in args:\n print(arg,)", " print(arg,)", " return ', '.join(args)", "def failing_handler(*args):\n if len(args) == 0:\n msg = 'Failure'\n...
class Mandatory: def __init__(self, mandatory1, mandatory2): self.mandatory1 = mandatory1 self.mandatory2 = mandatory2 def get_args(self): return self.mandatory1, self.mandatory2 class Defaults(object): def __init__(self, mandatory, default1='value', default2=None): self...
[ [ 3, 0, 0.1406, 0.25, 0, 0.66, 0, 745, 0, 2, 0, 0, 0, 0, 0 ], [ 2, 1, 0.125, 0.0938, 1, 0.84, 0, 555, 0, 3, 0, 0, 0, 0, 0 ], [ 14, 2, 0.125, 0.0312, 2, 0.27, 0,...
[ "class Mandatory:\n\n def __init__(self, mandatory1, mandatory2):\n self.mandatory1 = mandatory1\n self.mandatory2 = mandatory2\n\n def get_args(self):\n return self.mandatory1, self.mandatory2", " def __init__(self, mandatory1, mandatory2):\n self.mandatory1 = mandatory1\n ...
from ExampleLibrary import ExampleLibrary class ExtendPythonLib(ExampleLibrary): def kw_in_python_extender(self, arg): return arg/2 def print_many(self, *msgs): raise Exception('Overridden kw executed!') def using_method_from_python_parent(self): self.exception('Asser...
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 472, 0, 1, 0, 0, 472, 0, 0 ], [ 3, 0, 0.625, 0.8333, 0, 0.66, 1, 677, 0, 3, 0, 0, 472, 0, 2 ], [ 2, 1, 0.4583, 0.1667, 1, 0.06, ...
[ "from ExampleLibrary import ExampleLibrary", "class ExtendPythonLib(ExampleLibrary):\n \n def kw_in_python_extender(self, arg):\n return arg/2\n \n def print_many(self, *msgs):\n raise Exception('Overridden kw executed!')", " def kw_in_python_extender(self, arg):\n return arg...
__version__ = 'N/A' # This should be ignored when version is parsed class NameLibrary: handler_count = 10 def simple1(self): """Simple 1""" def simple2___(self): """Simple 2""" def underscore_name(self): """Underscore Name""" def underscore_name2_(self): """Undersc...
[ [ 14, 0, 0.0059, 0.0059, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.0941, 0.1471, 0, 0.66, 0.0769, 353, 0, 11, 0, 0, 0, 0, 0 ], [ 14, 1, 0.0294, 0.0059, 1, 0...
[ "__version__ = 'N/A' # This should be ignored when version is parsed", "class NameLibrary:\n handler_count = 10\n def simple1(self):\n \"\"\"Simple 1\"\"\"\n def simple2___(self):\n \"\"\"Simple 2\"\"\"\n def underscore_name(self):\n \"\"\"Underscore Name\"\"\"", " handler_c...
class NewStyleClassLibrary(object): def mirror(self, arg): arg = list(arg) arg.reverse() return ''.join(arg) def _property_getter(self): raise SystemExit('This should not be called, ever!!!') prop = property(_property_getter) class NewStyleClassArgsLibrar...
[ [ 3, 0, 0.1765, 0.3235, 0, 0.66, 0, 12, 0, 2, 0, 0, 186, 0, 5 ], [ 2, 1, 0.1324, 0.1176, 1, 0.64, 0, 697, 0, 2, 1, 0, 0, 0, 3 ], [ 14, 2, 0.1176, 0.0294, 2, 0.2, ...
[ "class NewStyleClassLibrary(object):\n \n def mirror(self, arg):\n arg = list(arg)\n arg.reverse()\n return ''.join(arg)\n\n def _property_getter(self):", " def mirror(self, arg):\n arg = list(arg)\n arg.reverse()\n return ''.join(arg)", " arg = list(...
class LibClass1: def verify_libclass1(self): return 'LibClass 1 works' class LibClass2: def verify_libclass2(self): return 'LibClass 2 works also'
[ [ 3, 0, 0.2273, 0.3636, 0, 0.66, 0, 529, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.3182, 0.1818, 1, 0.44, 0, 99, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 2, 0.3636, 0.0909, 2, 0.35, ...
[ "class LibClass1:\n \n def verify_libclass1(self):\n return 'LibClass 1 works'", " def verify_libclass1(self):\n return 'LibClass 1 works'", " return 'LibClass 1 works'", "class LibClass2:\n\n def verify_libclass2(self):\n return 'LibClass 2 works also'", " def ver...
class FatalCatastrophyException(RuntimeError): ROBOT_EXIT_ON_FAILURE = True class ContinuableApocalypseException(RuntimeError): ROBOT_CONTINUE_ON_FAILURE = True def exit_on_failure(): raise FatalCatastrophyException() def raise_continuable_failure(msg='Can be continued'): raise ContinuableApocalypseE...
[ [ 3, 0, 0.1364, 0.1818, 0, 0.66, 0, 572, 0, 0, 0, 0, 178, 0, 0 ], [ 14, 1, 0.1818, 0.0909, 1, 0.5, 0, 675, 1, 0, 0, 0, 0, 4, 0 ], [ 3, 0, 0.4091, 0.1818, 0, 0.66, ...
[ "class FatalCatastrophyException(RuntimeError):\n ROBOT_EXIT_ON_FAILURE = True", " ROBOT_EXIT_ON_FAILURE = True", "class ContinuableApocalypseException(RuntimeError):\n ROBOT_CONTINUE_ON_FAILURE = True", " ROBOT_CONTINUE_ON_FAILURE = True", "def exit_on_failure():\n raise FatalCatastrophyExce...
class _BaseDynamicLibrary(object): def get_keyword_names(self): return [] def run_keyword(self, name, *args): return None class StaticDocsLib(_BaseDynamicLibrary): """This is lib intro.""" def __init__(self, some=None, args=[]): """Init doc.""" class DynamicDocsLib(_BaseDynam...
[ [ 3, 0, 0.0976, 0.1707, 0, 0.66, 0, 914, 0, 2, 0, 0, 186, 0, 0 ], [ 2, 1, 0.0854, 0.0488, 1, 0.28, 0, 768, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 2, 0.0976, 0.0244, 2, 0, ...
[ "class _BaseDynamicLibrary(object):\n\n def get_keyword_names(self):\n return []\n\n def run_keyword(self, name, *args):\n return None", " def get_keyword_names(self):\n return []", " return []", " def run_keyword(self, name, *args):\n return None", " re...
ROBOT_LIBRARY_SCOPE = 'Test Suite' # this should be ignored __version__ = 'test' # this should be used as version of this library def passing(): pass def failing(): raise AssertionError('This is a failing keyword from module library') def logging(): print 'Hello from module library' print '*WARN* ...
[ [ 14, 0, 0.0185, 0.0185, 0, 0.66, 0, 305, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.037, 0.0185, 0, 0.66, 0.0588, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 2, 0, 0.1019, 0.037, 0, 0.66...
[ "ROBOT_LIBRARY_SCOPE = 'Test Suite' # this should be ignored", "__version__ = 'test' # this should be used as version of this library", "def passing():\n pass", "def failing():\n raise AssertionError('This is a failing keyword from module library')", "def logging():\n print('Hello from module lib...
import os import re from robot import utils from robot.utils.asserts import assert_equals from robot.result.resultbuilder import ExecutionResultBuilder from robot.result.executionresult import Result from robot.result.testsuite import TestSuite from robot.result.testcase import TestCase from robot.result.keyword impor...
[ [ 1, 0, 0.0052, 0.0052, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0103, 0.0052, 0, 0.66, 0.0588, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0206, 0.0052, 0, ...
[ "import os", "import re", "from robot import utils", "from robot.utils.asserts import assert_equals", "from robot.result.resultbuilder import ExecutionResultBuilder", "from robot.result.executionresult import Result", "from robot.result.testsuite import TestSuite", "from robot.result.testcase import T...
message_list = [ u'Circle is 360\u00B0', u'Hyv\u00E4\u00E4 \u00FC\u00F6t\u00E4', u'\u0989\u09C4 \u09F0 \u09FA \u099F \u09EB \u09EA \u09B9' ] message1 = message_list[0] message2 = message_list[1] message3 = message_list[2] messages = ', '.join(message_list) sect = unichr(167) auml = unic...
[ [ 14, 0, 0.1333, 0.2, 0, 0.66, 0, 656, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.3333, 0.0667, 0, 0.66, 0.1111, 880, 6, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.4, 0.0667, 0, 0.66, ...
[ "message_list = [ u'Circle is 360\\u00B0',\n u'Hyv\\u00E4\\u00E4 \\u00FC\\u00F6t\\u00E4',\n u'\\u0989\\u09C4 \\u09F0 \\u09FA \\u099F \\u09EB \\u09EA \\u09B9' ]", "message1 = message_list[0]", "message2 = message_list[1]", "message3 = message_list[2]", "messages = ', '.join(messag...
from os.path import abspath, dirname, join import os import robot __all__ = ['ROBOTPATH', 'ROBOT_VERSION', 'DATADIR', 'WINDOWS'] ROBOTPATH = dirname(abspath(robot.__file__)) ROBOT_VERSION = robot.version.get_version() DATADIR = join(dirname(abspath(__file__)), '..', 'testdata') WINDOWS = os.sep == '\\'
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 79, 0, 3, 0, 0, 79, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.2857, ...
[ "from os.path import abspath, dirname, join", "import os", "import robot", "__all__ = ['ROBOTPATH', 'ROBOT_VERSION', 'DATADIR', 'WINDOWS']", "ROBOTPATH = dirname(abspath(robot.__file__))", "ROBOT_VERSION = robot.version.get_version()", "DATADIR = join(dirname(abspath(__file__)), '..', 'testdata')", "W...
import os import sys from stat import S_IREAD, S_IWRITE class TestHelper: def set_read_only(self, path): os.chmod(path, S_IREAD) def set_read_write(self, path): os.chmod(path, S_IREAD | S_IWRITE) def get_output_name(self, *datasources): if not datasources: raise Runt...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0645, 0.0323, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0968, 0.0323, 0, ...
[ "import os", "import sys", "from stat import S_IREAD, S_IWRITE", "class TestHelper:\n\n def set_read_only(self, path):\n os.chmod(path, S_IREAD)\n\n def set_read_write(self, path):\n os.chmod(path, S_IREAD | S_IWRITE)", " def set_read_only(self, path):\n os.chmod(path, S_IREAD)...
#!/usr/bin/env python """Script to generate atest runners based on plain text data files. Usage: %s path/to/data.txt """ from __future__ import with_statement from os.path import abspath, basename, dirname, exists, join, splitext import os import sys if len(sys.argv) != 2 or splitext(sys.argv[1])[1] != '.txt': ...
[ [ 8, 0, 0.0918, 0.0816, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1633, 0.0204, 0, 0.66, 0.1111, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1837, 0.0204, 0, 0.66...
[ "\"\"\"Script to generate atest runners based on plain text data files.\n\nUsage: %s path/to/data.txt\n\"\"\"", "from __future__ import with_statement", "from os.path import abspath, basename, dirname, exists, join, splitext", "import os", "import sys", "if len(sys.argv) != 2 or splitext(sys.argv[1])[1] ...
#!/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 req...
[ [ 14, 0, 0.3342, 0.4947, 0, 0.66, 0, 952, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.5895, 0.0053, 0, 0.66, 0.1, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.5947, 0.0053, 0, 0.66...
[ "USAGE = \"\"\"robot.libdoc -- Robot Framework library documentation generator\n\nVersion: <VERSION>\n\nUsage: python -m robot.libdoc [options] library output_file\n or: python -m robot.libdoc [options] library list|show|version [names]\n\nLibdoc tool can generate keyword documentation in HTML and XML formats ...
# 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...
[ [ 1, 0, 0.5172, 0.0345, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.5517, 0.0345, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.5862, 0.0345, 0, ...
[ "import os", "import sys", "from java.lang import String", "if sys.version_info[:3] < (2, 5, 2):\n os._orig_listdir = os.listdir\n def listdir(path):\n items = os._orig_listdir(path)\n if isinstance(path, unicode):\n items = [unicode(String(i).toString()) for i in items]\n ...
# 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...
[ [ 1, 0, 0.1042, 0.0069, 0, 0.66, 0, 100, 0, 7, 0, 0, 100, 0, 0 ], [ 3, 0, 0.1528, 0.0625, 0, 0.66, 0.125, 723, 0, 2, 0, 0, 186, 0, 6 ], [ 2, 1, 0.1458, 0.0208, 1, 0...
[ "from java.lang import Byte, Short, Integer, Long, Boolean, Float, Double", "class JavaArgumentCoercer(object):\n\n def __init__(self, signatures, argspec):\n self._coercers = CoercerFinder().find_coercers(signatures)\n self._varargs_handler = VarargsHandler(argspec)\n\n def coerce(self, argum...
# 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 WARR...
[ [ 1, 0, 0.0882, 0.0074, 0, 0.66, 0, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.1029, 0.0074, 0, 0.66, 0.1111, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 1, 0, 0.1103, 0.0074, 0, ...
[ "import inspect", "from robot.errors import DataError", "from robot.variables import is_list_var, is_scalar_var", "from .argumentspec import ArgumentSpec", "class _ArgumentParser(object):\n\n def __init__(self, type='Keyword'):\n self._type = type\n\n def parse(self, name, source):\n ret...
# 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...
[ [ 1, 0, 0.25, 0.0167, 0, 0.66, 0, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 1, 0, 0.2667, 0.0167, 0, 0.66, 0.3333, 417, 0, 1, 0, 0, 417, 0, 0 ], [ 1, 0, 0.2833, 0.0167, 0, 0....
[ "from robot.errors import DataError", "from robot.utils import plural_or_not", "from robot.variables import is_list_var", "class ArgumentValidator(object):\n\n def __init__(self, argspec):\n self._argspec = argspec\n\n def validate(self, positional, named):\n self._validate_limits(position...
# 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...
[ [ 1, 0, 0.1376, 0.0092, 0, 0.66, 0, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 1, 0, 0.156, 0.0092, 0, 0.66, 0.2, 332, 0, 1, 0, 0, 332, 0, 0 ], [ 3, 0, 0.2477, 0.1376, 0, 0.66...
[ "from robot.errors import DataError", "from .argumentvalidator import ArgumentValidator", "class ArgumentResolver(object):\n\n def __init__(self, argspec, resolve_named=True,\n resolve_variables_until=None):\n self._named_resolver = NamedArgumentResolver(argspec) \\\n if res...
# 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...
[ [ 1, 0, 0.6, 0.04, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.68, 0.04, 0, 0.66, 0.2, 520, 0, 1, 0, 0, 520, 0, 0 ], [ 1, 0, 0.74, 0.08, 0, 0.66, 0.4, ...
[ "import sys", "from .argumentmapper import ArgumentMapper", "from .argumentparser import (PythonArgumentParser, UserKeywordArgumentParser,\n DynamicArgumentParser, JavaArgumentParser)", "from .argumentresolver import ArgumentResolver", "from .argumentvalidator import ArgumentVali...
# 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...
[ [ 3, 0, 0.4362, 0.2128, 0, 0.66, 0, 732, 0, 2, 0, 0, 186, 0, 4 ], [ 2, 1, 0.3936, 0.0426, 1, 0.52, 0, 555, 0, 2, 0, 0, 0, 0, 0 ], [ 14, 2, 0.4043, 0.0213, 2, 0.09, ...
[ "class ArgumentMapper(object):\n\n def __init__(self, argspec):\n self._argspec = argspec\n\n def map(self, positional, named, variables=None):\n template = KeywordCallTemplate(self._argspec, variables)\n template.fill_positional(positional)", " def __init__(self, argspec):\n ...
# 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...
[ [ 1, 0, 0.2206, 0.0147, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.25, 0.0147, 0, 0.66, 0.5, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 3, 0, 0.6471, 0.7206, 0, 0.66,...
[ "import sys", "from robot import utils", "class ArgumentSpec(object):\n\n def __init__(self, name, type='Keyword', positional=None, defaults=None,\n varargs=None, kwargs=None):\n self.name = name\n self.type = type\n self.positional = positional or []\n self.names ...
# 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...
[ [ 1, 0, 0.0379, 0.0025, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0429, 0.0025, 0, 0.66, 0.0476, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 1, 0, 0.0455, 0.0025, 0, ...
[ "from __future__ import with_statement", "from robot import utils", "from robot.errors import DataError", "from robot.variables import is_list_var", "from .arguments import (PythonArgumentParser, JavaArgumentParser,\n DynamicArgumentParser, ArgumentResolver,\n A...
# 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...
[ [ 1, 0, 0.1667, 0.0111, 0, 0.66, 0, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 1, 0, 0.1778, 0.0111, 0, 0.66, 0.1429, 417, 0, 2, 0, 0, 417, 0, 0 ], [ 2, 0, 0.2167, 0.0222, 0, ...
[ "from robot.errors import DataError", "from robot.utils import get_error_message, unic", "def no_dynamic_method(*args):\n pass", "class _DynamicMethod(object):\n _underscore_name = NotImplemented\n\n def __init__(self, lib):\n self.method = self._get_method(lib)\n\n def _get_method(self, li...
# 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...
[ [ 3, 0, 0.4026, 0.6169, 0, 0.66, 0, 239, 0, 15, 0, 0, 186, 0, 15 ], [ 14, 1, 0.1071, 0.013, 1, 0.25, 0, 16, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 1, 0.1169, 0.0065, 1, 0.25,...
[ "class SuiteRunErrors(object):\n _exit_on_failure_error = ('Critical failure occurred and ExitOnFailure '\n 'option is in use')\n _exit_on_fatal_error = 'Test execution is stopped due to a fatal error'\n _parent_init_error_prefix = 'Initialization of the parent suite failed:\\n...
# 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...
[ [ 1, 0, 0.2542, 0.0169, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2712, 0.0169, 0, 0.66, 0.5, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 3, 0, 0.661, 0.6949, 0, 0.66, ...
[ "import sys", "import threading", "class Thread(threading.Thread):\n \"\"\"A subclass of threading.Thread, with a stop() method.\n\n Original version posted by Connelly Barnes to python-list and available at\n http://mail.python.org/pipermail/python-list/2004-May/219465.html\n\n This version mainly ...
# 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...
[ [ 1, 0, 0.3659, 0.0244, 0, 0.66, 0, 621, 0, 4, 0, 0, 621, 0, 0 ], [ 1, 0, 0.4146, 0.0244, 0, 0.66, 0.5, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 3, 0, 0.7439, 0.5366, 0, 0.6...
[ "from signal import setitimer, signal, SIGALRM, ITIMER_REAL", "from robot.errors import TimeoutError", "class Timeout(object):\n\n def __init__(self, timeout, error):\n self._timeout = timeout\n self._error = error\n\n def execute(self, runnable):\n self._start_timer()", " def __...
# 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...
[ [ 1, 0, 0.2143, 0.0143, 0, 0.66, 0, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.2286, 0.0143, 0, 0.66, 0.2, 260, 0, 1, 0, 0, 260, 0, 0 ], [ 1, 0, 0.2429, 0.0143, 0, 0.6...
[ "import ctypes", "import thread", "import time", "from threading import Timer", "from robot.errors import TimeoutError", "class Timeout(object):\n\n def __init__(self, timeout, timeout_error):\n self._runner_thread_id = thread.get_ident()\n self._timeout_error = self._create_timeout_error...
# 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...
[ [ 1, 0, 0.1172, 0.0078, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.125, 0.0078, 0, 0.66, 0.2, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.1406, 0.0078, 0, 0.66...
[ "import sys", "from StringIO import StringIO", "from robot.output import LOGGER", "class OutputCapturer:\n\n def __init__(self, library_import=False):\n if library_import:\n LOGGER.enable_library_import_logging()\n self._library_import = library_import\n self._python_out = _...
# 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 la...
[ [ 1, 0, 0.2286, 0.0143, 0, 0.66, 0, 458, 0, 3, 0, 0, 458, 0, 0 ], [ 1, 0, 0.2429, 0.0143, 0, 0.66, 0.5, 164, 0, 1, 0, 0, 164, 0, 0 ], [ 3, 0, 0.6429, 0.7286, 0, 0.6...
[ "from fixture import Setup, Teardown, TestTemplate", "from timeouts import TestTimeout", "class DefaultValues(object):\n\n def __init__(self, settings, parent_default_values=None):\n self._parent = parent_default_values\n self._setup = settings.test_setup\n self._teardown = settings.test...
# 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...
[ [ 1, 0, 0.3061, 0.0204, 0, 0.66, 0, 878, 0, 1, 0, 0, 878, 0, 0 ], [ 1, 0, 0.3469, 0.0204, 0, 0.66, 0.3333, 417, 0, 1, 0, 0, 417, 0, 0 ], [ 3, 0, 0.6735, 0.551, 0, 0...
[ "import inspect", "from robot.utils import NormalizedDict", "class _RunKeywordRegister:\n\n def __init__(self):\n self._libs = {}\n\n def register_run_keyword(self, libname, keyword, args_to_process=None):\n if args_to_process is None:\n args_to_process = self._get_args_from_metho...
# 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...
[ [ 8, 0, 0.3491, 0.1509, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4528, 0.0189, 0, 0.66, 0.1429, 722, 0, 1, 0, 0, 722, 0, 0 ], [ 1, 0, 0.4717, 0.0189, 0, 0.66...
[ "\"\"\"Implements the core test execution logic.\n\nThe code in this package is in many places suboptimal and likely to change in\nRF 2.8. External code should use this package with care.\n\nCurrently, the main entry point is the :func:`~.model.TestSuite` factory\nmethod.\n\"\"\"", "from .model import TestSuite",...
# 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...
[ [ 1, 0, 0.1007, 0.0067, 0, 0.66, 0, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 1, 0, 0.1074, 0.0067, 0, 0.66, 0.25, 595, 0, 1, 0, 0, 595, 0, 0 ], [ 3, 0, 0.2114, 0.1745, 0, 0....
[ "from robot.errors import DataError", "from robot.variables import GLOBAL_VARIABLES", "class ExecutionContexts(object):\n\n def __init__(self):\n self._contexts = []\n\n @property\n def current(self):\n return self._contexts[-1] if self._contexts else None", " def __init__(self):\n ...
# 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...
[ [ 1, 0, 0.1163, 0.0078, 0, 0.66, 0, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.124, 0.0078, 0, 0.66, 0.125, 739, 0, 1, 0, 0, 739, 0, 0 ], [ 1, 0, 0.1395, 0.0078, 0, 0.66...
[ "import os.path", "import copy", "from robot.output import LOGGER", "from robot.parsing import ResourceFile", "from robot.errors import FrameworkError", "from robot import utils", "from .testlibraries import TestLibrary", "class Importer(object):\n\n def __init__(self):\n self._library_cache...
# 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...
[ [ 1, 0, 0.0459, 0.0031, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0489, 0.0031, 0, 0.66, 0.0588, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.052, 0.0031, 0, 0...
[ "from __future__ import with_statement", "import os", "import inspect", "from robot import utils", "from robot.errors import DataError", "from robot.common import BaseLibrary", "from robot.output import LOGGER", "from .dynamicmethods import (GetKeywordArguments, GetKeywordDocumentation,\n ...
# 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...
[ [ 3, 0, 0.5597, 0.8881, 0, 0.66, 0, 73, 0, 15, 0, 0, 0, 0, 29 ], [ 2, 1, 0.1828, 0.1045, 1, 0.56, 0, 555, 0, 3, 0, 0, 0, 0, 2 ], [ 14, 2, 0.1418, 0.0075, 2, 0.9, ...
[ "class VariableSplitter:\n\n def __init__(self, string, identifiers):\n self.identifier = None\n self.base = None\n self.index = None\n self.start = -1\n self.end = -1", " def __init__(self, string, identifiers):\n self.identifier = None\n self.base = None\n ...
# 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...
[ [ 1, 0, 0.0909, 0.0061, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.103, 0.0061, 0, 0.66, 0.1667, 299, 0, 1, 0, 0, 299, 0, 0 ], [ 1, 0, 0.1091, 0.0061, 0, 0...
[ "import re", "from robot.errors import DataError", "from robot.utils import safe_repr, format_assign_message, get_error_message", "from .isvar import is_list_var, is_scalar_var", "class VariableAssigner(object):\n _valid_extended_attr = re.compile('^[_a-zA-Z]\\w*$')\n\n def __init__(self, assign):\n ...
# 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...
[ [ 2, 0, 0.6379, 0.2069, 0, 0.66, 0, 481, 0, 1, 1, 0, 0, 0, 4 ], [ 4, 1, 0.6034, 0.069, 1, 0.51, 0, 0, 0, 0, 0, 0, 0, 0, 1 ], [ 13, 2, 0.6207, 0.0345, 2, 0.22, 0...
[ "def is_var(string):\n if not isinstance(string, basestring):\n return False\n length = len(string)\n return length > 3 and string[0] in ['$','@'] and string.rfind('{') == 1 \\\n and string.find('}') == length - 1", " if not isinstance(string, basestring):\n return False", "...
# 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...
[ [ 8, 0, 0.2237, 0.0658, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2763, 0.0132, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2895, 0.0132, 0, 0.66...
[ "\"\"\"Implements handling and resolving of variables.\n\nThis package is likely to change radically in RF 2.8. External code should use\nfunctionality provided directly by this package with care.\n\"\"\"", "import os", "import tempfile", "from robot import utils", "from robot.output import LOGGER", "from...
# 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...
[ [ 8, 0, 0.3, 0.02, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.34, 0.02, 0, 0.66, 0.0833, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.36, 0.02, 0, 0.66, 0.1667,...
[ "\"\"\"Module that adds directories needed by Robot to sys.path when imported.\"\"\"", "import os", "import sys", "import fnmatch", "from os.path import abspath, dirname, join", "ROBOTDIR = dirname(abspath(__file__))", "def add_path(path, end=False):\n if not end:\n remove_path(path)\n ...
# 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...
[ [ 1, 0, 0.1596, 0.0106, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 3, 0, 0.5957, 0.8191, 0, 0.66, 1, 140, 0, 12, 0, 0, 186, 0, 24 ], [ 14, 1, 0.2021, 0.0106, 1, 0....
[ "import itertools", "class RowSplitter(object):\n _comment_mark = '#'\n _empty_cell_escape = '${EMPTY}'\n _line_continuation = '...'\n _setting_table = 'setting'\n _tc_table = 'test case'\n _kw_table = 'keyword'", " _comment_mark = '#'", " _empty_cell_escape = '${EMPTY}'", " _line...
# 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...
[ [ 1, 0, 0.1007, 0.0067, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1141, 0.0067, 0, 0.66, 0.1429, 396, 0, 3, 0, 0, 396, 0, 0 ], [ 1, 0, 0.1208, 0.0067, 0, ...
[ "import re", "from .aligners import FirstColumnAligner, ColumnAligner, NullAligner", "from .dataextractor import DataExtractor", "from .rowsplitter import RowSplitter", "class _DataFileFormatter(object):\n _whitespace = re.compile('\\s{2,}')\n _split_multiline_doc = True\n\n def __init__(self, colu...
# 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...
[ [ 14, 0, 0.5857, 0.7571, 0, 0.66, 0, 986, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.9857, 0.0429, 0, 0.66, 1, 232, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "TEMPLATE_START = \"\"\"\\\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<style type=\"text/css\">\nhtml {\n font-family: Arial,Helvetica,sans-serif;", "TEMPLATE_END = \"\"\"</body>\n</html>\n\"\"\"" ...