2012/4/17 Patrick Ohly <[email protected]>:
> On Tue, 2012-04-17 at 15:24 +0200, Krzesimir Nowak wrote:
>> In the meantime I pushed some tests to my branch:
>> https://meego.gitorious.org/~krnowak/meego-middleware/krnowaks-syncevolution/commits/cmdline-tests-master
>
> 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 = 
> '''.format(
>         out, err, code = self.runCmdline(["--template", "? "])
>         self.assertEqualDiff(expected, out)
>         self.assertEqual(err, '')
>
> +    # TODO: better directory name? reuse some copied&patched testcases? see 
> src.am
> +    @property("ENV", 
> "SYNCEVOLUTION_TEMPLATE_DIR=templates_from_test_testcases")
> +    @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,
> though.

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:
https://meego.gitorious.org/~krnowak/meego-middleware/krnowaks-syncevolution/commits/cmdline-tests-master

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.
>
>
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution

Reply via email to