<br><br><div class="gmail_quote">On Mon, Mar 26, 2012 at 3:56 AM, <span dir="ltr"><<a href="mailto:Chris.Wesseling@cwi.nl">Chris.Wesseling@cwi.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2012-03-24T16:00:06-0500, John MacKenzie wrote:<br>
> <a href="http://github.com/198d/sclara" target="_blank">http://github.com/198d/sclara</a><br>
[...]<br>
<div class="im">> There are failures in both as a demonstration of how this interacts with a<br>
> TestRunner. The first one proves mainly that this is just Python; if you<br>
> use one of the provided runners you can execute your test files with the<br>
> Python interpreter (a big goal after looking at a tool like komira for this<br>
> sort of thing). The latter demonstrates that a nose plugin is possible and<br>
> probably implies that a py.test plugin is doable to.<br>
<br>
</div>Could you point me to "komira"? Your e-mail turns up as the only<br>
relevant hit using my search-fu.<br></blockquote><div><br></div><div>Konira is a Testing DSL framework [0] that I started working on about a year and a half ago. It</div><div>is not valid Python (hence the DSL connotation) but it is translated to it when tests are run</div>
<div>via de included Test Runner or with the py.test [1] plugin for it.</div><div><br></div><div>The problem that I see these solutions (including Konira) bring to the table is that they all try to</div><div>create a flexible, descriptive and terse domain for writing tests, and while some of them have a </div>
<div>significant gain over current testing standards, they fail when the complexity goes beyond </div><div>asserting something that has a nice description.</div><div><br></div><div>It might be heretic to raise this in a testing list for Python, but I also believe that the Python community</div>
<div>is not as pro-innovation in the testing environment as other communities are, which is detrimental to the fact</div><div>that there are a few people who don't like the standard testing framework and are looking forwards to an</div>
<div>alternative.</div><div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> Beyond sclara, I'm considering the idea that, more than a testing<br>
> framework, I stumbled on an interesting pattern for building generic DSLs<br>
> in Python (more on this soon, hopefully).<br>
><br>
> Thoughts?<br>
<br>
</div>I started reading the tests, to see if the DSL provides the clarity we need in<br>
this domain:<br>
<br>
examples/test_sclara.py line 14:<br>
<br>
with test('does not have access to inner setup context') as context:<br>
try:<br>
context.bar<br>
except AttributeError:<br>
pass<br>
<br>
<br>
Will this fail if no AttributeError is thrown?<br>
<br>
And line 45:<br>
<br>
with test('has access to inner setup context') as context:<br>
assert context.foo == 'bar'<br>
<br>
with test('has access to outer setup context') as context:<br>
assert context.bar == 'foo'<br>
<br>
Shouldn't "inner" and "outer" be swapped here?<br>
The outer setup adds foo and baz attributes.<br>
The inner setup adds the bar attribute to the context and changes the baz value.<br>
<br>
<br>
What I see as a pitfall for users with this idiom, is that it might invite to<br>
breaking isolation.<br>
<br>
Interesting, though.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>[0] <a href="http://konira.cafepais.com/docs/index.html">http://konira.cafepais.com/docs/index.html</a></div><div>[1] <a href="http://pypi.python.org/pypi/pytest-konira">http://pypi.python.org/pypi/pytest-konira</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">
--<br>
Chris Wesseling<br>
Centrum Wiskunde & Informatica (CWI)<br>
<a href="https://www.cwi.nl/people/ccw" target="_blank">https://www.cwi.nl/people/ccw</a><br>
</font></span><br>_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
<br></blockquote></div><br>