* 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
|
||||
name. Running the tests is not always enough!
|
||||
|
||||
Unittests
|
||||
---------
|
||||
Unit testing
|
||||
------------
|
||||
|
||||
Unittests are located in unittests directory. Running the tests are
|
||||
trivial. But you must syncronize your code and data with the test
|
||||
Unit tests are located in unittests directory. Running the tests is
|
||||
trivial. But you must synchronize your code and data with the test
|
||||
code, which can be a tedious work if you lose discipline.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
command will run tests in specfiletests and archivetests:
|
||||
keep in your mind that tests can depend on each other. (?) The unit test
|
||||
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
|
||||
-----------------
|
||||
|
||||
1. Demeter's Law
|
||||
|
||||
In OO programming, try to invoke Demeter's law.
|
||||
One of the "rules" there is not directly accessing any
|
||||
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)
|
||||
successful = ret == None
|
||||
if not successful:
|
||||
ui.error('ERROR: executing command: ' + cmd)
|
||||
for x in lines:
|
||||
print x
|
||||
ui.error('ERROR: executing command: ' + cmd + '\n' + strlist(lines))
|
||||
return (successful,lines)
|
||||
|
||||
# print a list
|
||||
|
||||
Reference in New Issue
Block a user