2012/4/17 Patrick Ohly <patrick.ohly(a)intel.com>:
On Tue, 2012-04-17 at 15:24 +0200, Krzesimir Nowak wrote:
> In the meantime I pushed some tests to my branch:
Some comment on that.
D-Bus Testing: added testMatchTemplate
------------------------------ test/test-dbus.py ------------------------------
index 21f69f3..d9abf2d 100755
@@ -4083,6 +4083,40 @@ sources/todo/config.ini:# databasePassword =
out, err, code = self.runCmdline(["--template", "? "])
+ # TODO: better directory name? reuse some copied&patched testcases? see src.am
+ @property("debug", False)
+ def testMatchTemplate(self):
test/testcases/templates are the templates used for the Cmdline.cpp
tests. Copy the files to test/test-dbus/templates so that there is a
templates dir inside it. Use "SYNCEVOLUTION_TEMPLATE_DIR=" + xdg_root +
"/templates". Then in the test itself, call
self.setUpFiles('templates'). That should make the D-Bus server use the
test templates instead of the installed ones - completely untested,
That did the trick, thanks. I only had to add new pair to setUpFiles.
Also, runCmdline now uses either passed env or self.storedenv,
depending whether env is None or not.
I added some more tests, they are as usual on my branch:
testPrintFileTemplatesConfig is fishy for me and fails with an error
for now. There is a TODO about it. Could you look at it?
Also, there are some TODOs in testSync. Maybe some --print-config +
some parameters could mimick the C++ code there?
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.