From a2ce40183f40fefb2c50e58cfc9904fb58e95bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Sat, 18 Jun 2005 20:13:07 +0000 Subject: [PATCH] * small fixes, improve docs a bit --- src/CODING | 19 +++++++++++-------- src/pisi/util.py | 4 +--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/CODING b/src/CODING index 628df724..cc6b0c25 100644 --- a/src/CODING +++ b/src/CODING @@ -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 diff --git a/src/pisi/util.py b/src/pisi/util.py index beeb1bac..a26f8c76 100644 --- a/src/pisi/util.py +++ b/src/pisi/util.py @@ -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