<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/112100/">http://git.reviewboard.kde.org/r/112100/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 15th, 2013, 3:54 p.m. UTC, <b>Sven Brauch</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/112100/diff/1/?file=179751#file179751line141" style="color: black; font-weight: bold; text-decoration: underline;">duchain/tests/pyduchaintest.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void PyDUChainTest::initShell()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">81</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">QFile</span> <span class="nf">f</span><span class="p">(</span><span class="s">"/tmp/i.py"</span><span class="p">);</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">141</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="kt">char</span> <span class="n">tempdirname</span><span class="p">[]</span> <span class="o">=</span> <span class="s">"/tmp/kdev-python-test.XXXXXX"</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Please use QDir::tempPath() instead of /tmp, I was doing this wrong too ;)</pre>
</blockquote>
<p>On August 15th, 2013, 3:57 p.m. UTC, <b>Sven Brauch</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Oh and please don't use character arrays. Use QString.</pre>
</blockquote>
<p>On August 15th, 2013, 5:01 p.m. UTC, <b>Zaar Hai</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
</blockquote>
<p>On August 15th, 2013, 5:58 p.m. UTC, <b>Sven Brauch</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">There's QTempFile, maybe you can use that?</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It's only for files, not directories. There is QTempDir in Qt 5.0, but we are not there yet :-)</pre>
<br />
<p>- Zaar</p>
<br />
<p>On August 15th, 2013, 5:01 p.m. UTC, Zaar Hai wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDevelop.</div>
<div>By Zaar Hai.</div>
<p style="color: grey;"><i>Updated Aug. 15, 2013, 5:01 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">* 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</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">make test</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>duchain/tests/CMakeLists.txt <span style="color: grey">(7ff16e2)</span></li>
<li>duchain/tests/data/testImportDeclarations/i.py <span style="color: grey">(PRE-CREATION)</span></li>
<li>duchain/tests/data/testInheritance/i.py <span style="color: grey">(PRE-CREATION)</span></li>
<li>duchain/tests/data/testMultiFromImport/i.py <span style="color: grey">(PRE-CREATION)</span></li>
<li>duchain/tests/pyduchaintest.h <span style="color: grey">(5fddab4)</span></li>
<li>duchain/tests/pyduchaintest.cpp <span style="color: grey">(00573be)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/112100/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>