@@ -22,10 +22,17 @@ class handles the common parts of the challenge flow, the child class just
2222<__init__> method to see what instance attributes are already prepared to serve
2323the communication of the methods.
2424
25- By the class attribute <sample> a minimal example of the possible input is
26- given. This is recommended for every challenge. It is useful during
27- development or for smoke tests. Otherwise this class attribute
28- will be overwritten by injection of an instance attribute of the same name.
25+ By the class attribute <sample> a small example of the possible input is
26+ given. This is recommended for every challenge. It is useful as input of
27+ unit tests or for the smoke tests with the -k option. For more extended
28+ input, in example from the given data files, this class attribute will be
29+ overwritten by injection of an instance attribute of the same name.
30+
31+ The optional class attribute <expect> the expected output for the given
32+ <sample> sets the expected output. This is typically used by unit tests.
33+
34+ Together <sample> and <expect> serve as documantation of the intention of
35+ the challenge.
2936"""
3037
3138from challenges import Challenge
@@ -44,23 +51,21 @@ class HelloWorldChallenge(Challenge):
4451 WorldHello
4552 '''
4653
47- """This is the input sample. It can be overwritten by injection.
48-
49- * first line: integer
50- * second line: word
54+ """This is a small exsample of the input. It can be overwritten by
55+ injection.
5156
5257 It is used by the --klass option of the challenge runner.
53- It can be used for unit tests.
58+ It is also used by unit tests.
5459
5560 prompt> challenge HelloWorld/ --klass
5661 Hello World
5762 """
5863
5964 expect = 'Hello World'
6065
61- """This is the expected output for the sample.
66+ """This is the expected output for the given sample.
6267
63- It can be used for unit tests.
68+ It is used by unit tests, especially by the full integration test .
6469 """
6570
6671 def build (self ):
0 commit comments