* small fixes, improve docs a bit
This commit is contained in:
+11
-8
@@ -16,29 +16,32 @@ Guidelines
|
|||||||
breaks anything and fix breakage. For instance a
|
breaks anything and fix breakage. For instance a
|
||||||
name. Running the tests is not always enough!
|
name. Running the tests is not always enough!
|
||||||
|
|
||||||
Unittests
|
Unit testing
|
||||||
---------
|
------------
|
||||||
|
|
||||||
Unittests are located in unittests directory. Running the tests are
|
Unit tests are located in unittests directory. Running the tests is
|
||||||
trivial. But you must syncronize your code and data with the test
|
trivial. But you must synchronize your code and data with the test
|
||||||
code, which can be a tedious work if you lose discipline.
|
code, which can be a tedious work if you lose discipline.
|
||||||
|
|
||||||
Sample data files are located in samples/ directory.
|
Sample data files are located in samples/ directory.
|
||||||
|
|
||||||
For running all test suites, use the following command:
|
For running the entire test suite, use the following command:
|
||||||
|
|
||||||
$ ./unittests/run.py
|
$ ./unittests/run.py
|
||||||
|
|
||||||
If you know what you are doing, you can run the tests seperately. But
|
If you know what you are doing, you can run the tests seperately. But
|
||||||
keep in your mind that test can depend each other. The following
|
keep in your mind that tests can depend on each other. (?) The unit test
|
||||||
command will run tests in specfiletests and archivetests:
|
system doesn't know about that. The following command will run tests
|
||||||
|
in specfiletests and archivetests in unittests dir:
|
||||||
|
|
||||||
$ ./unittests/run.py specfiletests archivetests
|
$ ./unittests/run.py specfile archive
|
||||||
|
|
||||||
|
|
||||||
Misc. Suggestions
|
Misc. Suggestions
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
1. Demeter's Law
|
||||||
|
|
||||||
In OO programming, try to invoke Demeter's law.
|
In OO programming, try to invoke Demeter's law.
|
||||||
One of the "rules" there is not directly accessing any
|
One of the "rules" there is not directly accessing any
|
||||||
objects that are further than, 2/3 refs, away. So the
|
objects that are further than, 2/3 refs, away. So the
|
||||||
|
|||||||
+1
-3
@@ -61,9 +61,7 @@ def run_batch(cmd):
|
|||||||
ui.debug('return value ' + ret)
|
ui.debug('return value ' + ret)
|
||||||
successful = ret == None
|
successful = ret == None
|
||||||
if not successful:
|
if not successful:
|
||||||
ui.error('ERROR: executing command: ' + cmd)
|
ui.error('ERROR: executing command: ' + cmd + '\n' + strlist(lines))
|
||||||
for x in lines:
|
|
||||||
print x
|
|
||||||
return (successful,lines)
|
return (successful,lines)
|
||||||
|
|
||||||
# print a list
|
# print a list
|
||||||
|
|||||||
Reference in New Issue
Block a user