[py-svn] r63182 - py/extradoc/talk/pycon-us-2009/pytest-introduction

briandorsey at codespeak.net briandorsey at codespeak.net
Sat Mar 21 15:44:16 CET 2009


Author: briandorsey
Date: Sat Mar 21 15:44:16 2009
New Revision: 63182

Modified:
   py/extradoc/talk/pycon-us-2009/pytest-introduction/TODO.txt
   py/extradoc/talk/pycon-us-2009/pytest-introduction/pytest-introduction.html
Log:
Updated TODO and sync'd html


Modified: py/extradoc/talk/pycon-us-2009/pytest-introduction/TODO.txt
==============================================================================
--- py/extradoc/talk/pycon-us-2009/pytest-introduction/TODO.txt	(original)
+++ py/extradoc/talk/pycon-us-2009/pytest-introduction/TODO.txt	Sat Mar 21 15:44:16 2009
@@ -1,6 +1,8 @@
 - finish outline
+- reference /py/dist for install
 - determine which demos & exercises to write
 - placeholder: write demos
+- run py lib tests on windows
 - experiment with funcargs
 
 - read: http://us.pycon.org/2009/conference/helpforspeakers/

Modified: py/extradoc/talk/pycon-us-2009/pytest-introduction/pytest-introduction.html
==============================================================================
--- py/extradoc/talk/pycon-us-2009/pytest-introduction/pytest-introduction.html	(original)
+++ py/extradoc/talk/pycon-us-2009/pytest-introduction/pytest-introduction.html	Sat Mar 21 15:44:16 2009
@@ -465,10 +465,10 @@
 <p><em>"nose provides an alternate test discovery and running process for unittest, one that is intended to mimic the behavior of py.test as much as is reasonably possible without resorting to too much magic."</em> -- from nose home page</p>
 <ul class="simple">
 <li>nosetest and py.test share basic philosophy and features.</li>
-<li>py.test used to be more difficult to distribute and had (has?) a perception
-of having too much magic.</li>
-<li>opinion: nose is basically a subset of py.test</li>
-<li>for basic use, can be difficult to choose - luckily you already have. :)</li>
+<li>py.test has a more refined debugging/failure API</li>
+<li>nose has plugins - upcoming pytest-1.0 as well</li>
+<li>for basic use, not much difference</li>
+<li>more co-operation between the projects upcoming</li>
 </ul>
 <p class="handout">None of the above features are in xUnit frameworks (like stdlib unittest)</p>
 <p class="handout">Nose doesn't do re-interpretation of failed statements, so it prints less
@@ -535,9 +535,6 @@
 def test_four():       | def test_bonus():
     print "debug text" |   py.test.raises(
     assert False       |     ValueError, int, 'foo')
-
-def test_bonus():
-    py.test.raises(ValueError, int, 'foo')
 </pre>
 <p>TODO: write handout/exercise</p>
 </div>
@@ -684,8 +681,30 @@
     assert something == True
 </pre>
 </div>
-<div class="slide" id="generative-tests">
-<h1>generative tests</h1>
+<div class="slide" id="generative-tests-1">
+<h1>generative tests 1</h1>
+<pre class="literal-block">
+def test_ensure_sufficient_spam():
+    assert 'spam' in 'spam'.lower()
+    assert 'spam' in 'SPAM'.lower()
+    assert 'spam' in 'eggs & spam'.lower()
+    assert 'spam' in 'fish'.lower()
+    assert 'spam' in 'spammy'.lower()
+    assert 'spam' in 'more spam'.lower()
+</pre>
+</div>
+<div class="slide" id="generative-tests-2">
+<h1>generative tests 2</h1>
+<pre class="literal-block">
+def test_ensure_sufficient_spam():
+    data = ['spam', 'SPAM', 'eggs & spam',
+            'fish','spammy', 'more spam']
+    for item in data:
+        assert 'spam' in item.lower()
+</pre>
+</div>
+<div class="slide" id="generative-tests-3">
+<h1>generative tests 3</h1>
 <pre class="literal-block">
 def contains_spam(item):
     assert 'spam' in item.lower()



More information about the pytest-commit mailing list