Skip to content

Commit 1aacd27

Browse files
committed
tuning example library
1 parent 42ee7ff commit 1aacd27

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

example/examplelibrary.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python
22

33
import os
4-
import sys
54

65

76
class ExampleRemoteLibrary:
@@ -10,19 +9,20 @@ class ExampleRemoteLibrary:
109
This documentation is visible in docs generated by `Libdoc`.
1110
"""
1211

13-
def __init__(self):
14-
"""Also this doc should be in shown in library doc."""
15-
1612
def count_items_in_directory(self, path):
1713
"""Returns the number of items in the directory specified by `path`."""
1814
return len([i for i in os.listdir(path) if not i.startswith('.')])
1915

2016
def strings_should_be_equal(self, str1, str2):
2117
print "Comparing '%s' to '%s'." % (str1, str2)
18+
if not (isinstance(str1, basestring) and isinstance(str2, basestring)):
19+
raise AssertionError("Given strings are not strings.")
2220
if str1 != str2:
2321
raise AssertionError("Given strings are not equal.")
2422

2523

2624
if __name__ == '__main__':
25+
import sys
2726
from robotremoteserver import RobotRemoteServer
27+
2828
RobotRemoteServer(ExampleRemoteLibrary(), *sys.argv[1:])

0 commit comments

Comments
 (0)