code
stringlengths
1
1.72M
language
stringclasses
1 value
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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 ag...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
# Copyright 2008-2011 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...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
#!/usr/bin/env python # tool2html.py -- Creates HTML version of given tool documentation # # First part of this file is Pygments configuration and actual # documentation generation follows it. # # Pygments configuration # # This code is from 'external/rst-directive.py' file included in Pygments 0.9 # distribution. F...
Python
# Copyright 2008-2011 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 ag...
Python
#!/usr/bin/env python import os import sys class ExampleRemoteLibrary: def count_items_in_directory(self, path): return len(i for i in os.listdir(path) if not i.startswith('.')) def strings_should_be_equal(self, str1, str2): print "Comparing '%s' to '%s'" % (str1, str2) if str1 != s...
Python
import sys from SimpleXMLRPCServer import SimpleXMLRPCServer class SimpleLibrary(SimpleXMLRPCServer): def __init__(self, port=8270): SimpleXMLRPCServer.__init__(self, ('localhost', int(port))) self.register_function(self.get_keyword_names) self.register_function(self.run_keyword) ...
Python
# Can be used in the test data like ${MyObject()} or ${MyObject(1)} class MyObject: def __init__(self, index=''): self.index = index def __str__(self): return '<MyObject%s>' % self.index UNICODE = (u'Hyv\u00E4\u00E4 y\u00F6t\u00E4. ' u'\u0421\u043F\u0430\u0441\u0438\u0431\u043E!') LI...
Python
#!/usr/bin/env python """Script for running the remote library tests against different servers. Usage 1: run.py language[:runner] [[options] datasources] Valid languages are 'python', 'jython' or 'ruby', and runner can either by 'pybot' (default) or 'jybot'. By default, all tests under 'test/data' directory are run, ...
Python
import sys class RemoteTestLibrary: _unicode = (u'Hyv\u00E4\u00E4 y\u00F6t\u00E4. ' u'\u0421\u043F\u0430\u0441\u0438\u0431\u043E!') def get_server_language(self): lang = sys.platform.startswith('java') and 'jython' or 'python' return '%s%d%d' % (lang, sys.version_info[0], sys...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
class regular: ROBOT_LIBRARY_SCOPE = 'TEST SUITE' """This is a very regular test library""" def __init__(self, arg1='hello', arg2='world'): """Constructs a new regular test library See `keyword` Examples: | regular | foo | bar | | regular | | # defaul...
Python
class RequiredArgs: def __init__(self, required, arguments, default="value"): """This library always needs two arguments and has one default. Keyword names are got from the given arguments. """ self.__dict__[required] = lambda: None self.__dict__[arguments] = lambda arg: No...
Python
class new_style_no_init(object): """No __init__ on this one.""" def kw(self): """The only lonely keyword."""
Python
class no_arg_init: def __init__(self): """This doc not shown because there are no arguments.""" def keyword(self): """A keyword. See `get hello` for details and *never* run this keyword. """ 1/0 def get_hello(self, arg): """Returns 'Hello `arg`!'. ...
Python
class dynamic: def get_keyword_names(self): return ['Keyword 1', 'KW 2'] def run_keyword(self, name, args): print name, args def get_keyword_arguments(self, name): return [ 'arg%d' % (i+1) for i in range(int(name[-1])) ] def get_keyword_documentation(self, name): retu...
Python
u"""Module test library. With some non-ascii stuff: Hyv\u00E4\u00E4 y\u00F6t\u00E4. \u0421\u043F\u0430\u0441\u0438\u0431\u043E! """ ROBOT_LIBRARY_VERSION = '0.1-alpha' def keyword(): """A keyword See `get hello` for details""" pass def get_hello(): """Get the intialization variables See `imp...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
#!/usr/bin/env python # Copyright 2008-2011 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...
Python
#!/usr/bin/env python import sys import os import tempfile DATABASE_FILE = os.path.join(tempfile.gettempdir(), 'robotframework-quickstart-db.txt') class DataBase(object): def __init__(self, dbfile): """This class reads ands writes user data in a 'database'. dbfile can be either or string or already op...
Python
#!/usr/bin/env python """qs2html.py -- Creates HTML version of Robot Framework Quick Start Guide Usage: qs2html.py [ cr(eate) | dist | zip ] create .. Creates the HTML version of the Quick Start Guide. dist .... Creates the Quick Start Guide and copies it and all its dependencies under directory named '...
Python
import os import sys import subprocess class LoginLibrary: def __init__(self): self._sut_path = os.path.join(os.path.dirname(__file__), '..', 'sut', 'login.py') self._status = '' def create_user(self, username, password): self._run_command('creat...
Python
def simple_keyword(): """Log a message""" print 'You have used the simplest keyword.' def greet(name): """Logs a friendly greeting to person given as argument""" print 'Hello %s!' % name def multiply_by_two(number): """Returns the given number multiplied by two The result is always a floa...
Python
#!/usr/bin/env python """pt2html.py -- Creates HTML version of Python Tutorial Usage: pt2html.py """ import sys import os import shutil import time sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'userguide')) import ug2html # This also initializes docutils and pygments def create_tutorial(): ...
Python
#!/usr/bin/env python """Usage: lib2html.py [ library | all ] Libraries: BuiltIn (bu) Collections (co) Dialogs (di) OperatingSystem (op) Screenshot (sc) String (st) Telnet (te) """ import sys import tempfile import os import re ROOT = os.path.normpath(os.path.join(os.path.abspath(__file__),'..','..',...
Python
#!/usr/bin/env python """ug2html.py -- Creates HTML version of Robot Framework User Guide Usage: ug2html.py [ cr(eate) | dist | zip ] create .. Creates the user guide so that it has relative links to images, library docs, etc. This version is stored in the version control and distributed with th...
Python
#!/usr/bin/env python """Usage: check_test_times.py inpath [outpath] Reads result of a test run from Robot output file and checks that no test took longer than 3 minutest to execute. If outpath is not given, the result is written over the original file. """ import sys from robot.output import TestSuite def check_...
Python
class CheckMultipleItemsLibrary: def items_should_not_contain(self, value, *items): """Checks that none of the given 'items' contains the given 'value'.""" items_containing_value = [ item for item in items if value in item ] if items_containing_value: message = "Items '%s' cont...
Python
"""Robot Framework test library example that calls C code. This example uses Python's standard `ctypes` module, which requires that the C code is compiled into a shared library. It is also possible to execute this file from the command line to test the C code manually. """ from ctypes import CDLL, c_char_p LIBRARY...
Python
#!/usr/bin/env python # Copyright 2008-2011 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 b...
Python
from robot import run as run_robot import cProfile import pstats filename = 'robot.profile' cProfile.run('run_robot("/home/husa/workspace/robotframework/atest/testdata/misc/")', filename) p = pstats.Stats(filename) p.strip_dirs().sort_stats(-1).print_stats()
Python
from os.path import dirname, join import subprocess basedir = dirname(__file__) cmd = ['pybot', '--outputdir', join(basedir, 'results'), join(basedir, 'vacalc')] pythonpath = '%s:%s' % (join(basedir, 'lib'), join(basedir, '..', 'src')) subprocess.call(' '.join(cmd), shell=True, env={'PYTHONPATH': pythonpath})
Python
import os import sys import subprocess import datetime import tempfile import vacalc class VacalcLibrary(object): def __init__(self): self._db_file = os.path.join(tempfile.gettempdir(), 'vacalc-atestdb.csv') def count_vacation(self, startdate, year): res...
Python
from __future__ import with_statement import os import sys import csv import datetime import tempfile class VacalcError(Exception): pass class EmployeeStore(object): def __init__(self, db_file): self._db_file = db_file if self._db_file and os.path.isfile(self._db_file): self._employ...
Python
VALUE_FROM_VAR_FILE='Expected Value'
Python
def this_keyword_is_in_funnylib(): print 'jee'
Python
# Copyright 2008-2011 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...
Python
from Queue import Queue from threading import Event try: from multiprocessing.managers import BaseManager except ImportError: class Python26Required(object): def __call__(self, *args): raise RuntimeError('Requires Python > 2.6') def __getattr__(self, name): raise Runt...
Python
# -*- python -*- # ex: set syntax=python: import os ROBOT_FRAMEWORK_REPOSITORY = 'http://robotframework.googlecode.com/svn/trunk/' # This is the dictionary that the buildmaster pays attention to. We also use # a shorter alias to save typing. c = BuildmasterConfig = {} ####### BUILDSLAVES from buildbot.buildslave impo...
Python
#!/usr/bin/env python """A tool for creating data driven test case for Robot Framework Usage: testgen.py variablefile template output This script reads the variable and template files and generates a test suite which has all test cases found in the template multiplied with all the rows of the variable file. Suite s...
Python
import datetime from vacalc.employeestore import Employee def calculate_vacation(startdate, vacation_year, exp_vacation_days): try: sdate = datetime.date(*(int(item) for item in startdate.split('-'))) except Exception, err: raise AssertionError('Invalid time format %s' % err) actual_days =...
Python
import os import tempfile from org.robotframework.vacalc import VacationCalculator from vacalc.ui import VacalcFrame from vacalc.employeestore import EmployeeStore, VacalcError class VacalcApplication(VacationCalculator): def create(self): default_db = os.path.join(tempfile.gettempdir(), 'vacalcdb.csv')...
Python
from javax.swing import JFrame, JList, JPanel, JLabel, JTextField, JButton, Box, BoxLayout, JTable from javax.swing.event import ListSelectionListener from javax.swing.table import AbstractTableModel from java.awt.event import ActionListener from java.awt import FlowLayout, BorderLayout, Dimension, Font, Color class ...
Python
from vacalcapp import VacalcApplication
Python
from __future__ import with_statement import os import csv import datetime class VacalcError(RuntimeError): pass class EmployeeStore(object): def __init__(self, db_file): self._db_file = db_file if self._db_file and os.path.isfile(self._db_file): self._employees = self._read_employ...
Python
#!/usr/bin/env python """Packaging script for Robot Framework Usage: package.py command version_number [release_tag] Argument 'command' can have one of the following values: - sdist : create source distribution - wininst : create Windows installer - all : create both packages - version : update on...
Python
# # Copyright (C) 2008 The Android Open Source Project # # 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...
Python