Skip to content

Commit 09f21a9

Browse files
committed
Initial README
1 parent 05116e9 commit 09f21a9

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

README.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Python Library Core
2+
===================
3+
4+
Tools to ease creating larger test libraries for `Robot Framework`_ using
5+
Python.
6+
7+
At the moment work-in-progress. Planned to be used with Selenium2Library.
8+
9+
Example
10+
-------
11+
12+
.. sourcecode:: python
13+
14+
"""Main library."""
15+
16+
from robotlibcore import HybridCore
17+
18+
from mystuff import Library1, Library2
19+
20+
21+
class MyLibrary(HybridCore):
22+
"""General library documentation."""
23+
24+
def __init__(self):
25+
libraries = [Library1(), Library2()]
26+
HybridCore.__init__(self, libraries)
27+
28+
29+
.. sourcecode:: python
30+
31+
"""Library components."""
32+
33+
from robotlibcore import keyword
34+
35+
36+
class Library1(object):
37+
38+
@keyword
39+
def example(self):
40+
"""Keyword documentation."""
41+
pass
42+
43+
@keyword
44+
def another_example(self, arg1, arg2='default'):
45+
pass
46+
47+
def not_keyword(self):
48+
pass
49+
50+
51+
class Library2(object):
52+
53+
@keyword('Custom name')
54+
def this_name_is_not_used(self):
55+
pass
56+
57+
@keyword(tags=['tag', 'another'])
58+
def tags(self):
59+
pass
60+
61+
62+
.. _Robot Framework: http://robotframework.org

0 commit comments

Comments
 (0)