Review Request 112100: Support for unittest python assets and some basic cleanup
Zaar Hai
haizaar at haizaar.com
Thu Aug 15 20:37:07 UTC 2013
> On Aug. 15, 2013, 3:54 p.m., Sven Brauch wrote:
> > duchain/tests/pyduchaintest.cpp, line 141
> > <http://git.reviewboard.kde.org/r/112100/diff/1/?file=179751#file179751line141>
> >
> > Please use QDir::tempPath() instead of /tmp, I was doing this wrong too ;)
>
> Sven Brauch wrote:
> Oh and please don't use character arrays. Use QString.
>
> Zaar Hai wrote:
> Well, if I do
> QDir tempdirname;
> tempdirname = QDir(QDir::tempPath());
>
> Then how do I pass output of
> tempdirname.absoluteFilePath("kdev-python-test.XXXXXX")
> to mkdtemp, which is a C function, and get back its result, which also can be NULL?
> Also mkdtemp modifies passed character array in place.
>
> Sven Brauch wrote:
> There's QTempFile, maybe you can use that?
It's only for files, not directories. There is QTempDir in Qt 5.0, but we are not there yet :-)
- Zaar
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112100/#review37849
-----------------------------------------------------------
On Aug. 15, 2013, 5:01 p.m., Zaar Hai wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112100/
> -----------------------------------------------------------
>
> (Updated Aug. 15, 2013, 5:01 p.m.)
>
>
> Review request for KDevelop.
>
>
> Description
> -------
>
> * Each test now can have python files in duchain/tests/data/<testFunctionName>
> * Those files will be automatically parsed before test function gets invoked
> * Temporary directory is created before test start and all TestFiles are staged there (instead of /tmp)
>
> Sven,
> * Please have a look at my FIXME lines - I'm not sure what is the right way to abort tests execution
> * I've changed testImportDeclarations test a bit (the second data line) - please have a look that I did not do anything stupid
>
> Thanks,
> Zaar
>
>
> Diffs
> -----
>
> duchain/tests/CMakeLists.txt 7ff16e2
> duchain/tests/data/testImportDeclarations/i.py PRE-CREATION
> duchain/tests/data/testInheritance/i.py PRE-CREATION
> duchain/tests/data/testMultiFromImport/i.py PRE-CREATION
> duchain/tests/pyduchaintest.h 5fddab4
> duchain/tests/pyduchaintest.cpp 00573be
>
> Diff: http://git.reviewboard.kde.org/r/112100/diff/
>
>
> Testing
> -------
>
> make test
>
>
> Thanks,
>
> Zaar Hai
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130815/1e3a406d/attachment.html>
More information about the KDevelop-devel
mailing list