-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule-presentations-75.html
231 lines (226 loc) · 11.4 KB
/
schedule-presentations-75.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
---
permalink: /schedule/presentations/75/
title: 'DjangoCon US : Presentation: Django''s Nasal Passage'
---
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8"/>
<title>DjangoCon US : Presentation: Django's Nasal Passage</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<link href="../../../static/css/bde01dea2fa1.css" rel="stylesheet" type="text/css"/>
<!-- HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="../../../static/img/favicon.png" rel="shortcut icon"/>
<style>
a.unbookmark {
text-decoration: none;
padding-left: 20px;
background: url(http://2012.djangocon.us/static/img/star.png) no-repeat left;
}
a.bookmark {
text-decoration: none;
padding-left: 20px;
background: url(http://2012.djangocon.us/static/img/star_unselected.png) no-repeat left;
}
div.slot {
font-weight: bold;
}
</style>
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport"/>
</head>
<body class="talk_detail" id="">
<header id="site_header">
<h1><a href="../../../index.html">DjangoCon US 2012 - Washington, DC</a></h1>
<div id="account-bar">
<a href="../../../account/login/index.html">Log in</a> or <a href="../../../account/signup/index.html">Sign Up</a>
</div>
<nav id="site_nav">
<ul>
<li class="register_tab"><a href="http://djangoconus2012.eventbrite.com/">Register</a></li>
<li class="schedule_tab"><a href="../../index.html">Schedule</a></li>
<li class="venue_tab"><a href="../../../venue/index.html">Venue</a></li>
<li class="sponsors_tab"><a href="../../../sponsors/index.html">Sponsors</a></li>
<li class="lightning_tab"><a href="../../../lightning/index.html">Lightning Talks</a></li>
<li class="sprints_tab"><a href="../../../sprints/index.html">Sprints</a></li>
<li class="openspaces_tab"><a href="../../../open-spaces/index.html">Open Spaces</a></li>
<li class="about_tab"><a href="../../../about/index.html">About</a></li>
<li class="tutorials_tab"><a href="../../../tutorials/index.html">Tutorials</a></li>
</ul>
</nav>
</header>
<section id="main_content">
<h1 class="talk_title">Django's Nasal Passage</h1>
<section class="meta">
A Talk presented by
<a href="../../../speaker/profile/82/index.html">Erik Rose</a>
<div id="personal">
<a href="../../../account/login/index.html@next=%25252Fschedule%25252Fpresentations%25252F75%25252F.html">log in</a> to bookmark.
</div>
</section>
<h3>Audience level</h3>
<p>Intermediate</p>
<h3>Category</h3>
<p>Other</p>
<h3>Time</h3>
<p>September 6th, 4:20 p.m. – 5 p.m.</p>
<hr/>
<h3>Description</h3>
<p class="description">Django's testrunner gets you started quickly, but you soon hit your head on its limitations as your project grows. By trading it for nose, a testing framework popular in the wider Python community, we can reduce boilerplate, boost performance, and improve testing UI, with only a few lines of setting changes. Re-use your test DBs, integrate with Jenkins, split your suite into pieces, and more.</p>
<hr/>
<div>
<h2>Abstract</h2>
</div>
<div class="abstract"><ul>
<li>Why nose?<ul>
<li>Pain points with standard Django testing</li>
<li>Extensibility without writing custom, uncombineable testrunner subclasses</li>
<li>Rich ecosystem of helpful plugins</li>
</ul>
</li>
<li>django-nose<ul>
<li>Testing just your apps, not all the random installed stuff</li>
<li>Test-selection tricks: running just failed tests, running a module, etc.</li>
<li>Killing the boilerplate:<ul>
<li>No more imports into <strong>init</strong></li>
<li>No more class name collisions and accidental shadowing</li>
<li>With all this freedom, how best should you organize your tests?</li>
</ul>
</li>
<li>Going 4 times faster with fixture bundling<ul>
<li>Troubleshooting</li>
<li>Fixtures are evil</li>
<li>Where do I put the factories?</li>
</ul>
</li>
<li>Speeding startup with test DB reuse</li>
<li>Writing faster TransactionTestCases with hygienic base classes<ul>
<li>Background on Django's handling of TransactionTestCases</li>
<li>How to improve matters</li>
</ul>
</li>
<li>Test-only models: what's the best practice?</li>
</ul>
</li>
<li>nose-progressive<ul>
<li>Dots considered harmful. When will my tests be done?</li>
<li>Patience is for the dead. Show me my tracebacks as they happen!</li>
<li>My terminal is only this big. Don't waste my space.</li>
<li>Hiding pointless stack frames</li>
<li>Editor round-tripping for quick debugging</li>
</ul>
</li>
<li>Splitting into sub-suites<ul>
<li>An introduction to the attr plugin</li>
<li>Have some run only on CI machines, some constantly, others before checkin</li>
<li>Choosing tests with regexes</li>
</ul>
</li>
<li>Other fun plugins<ul>
<li>f7u12, for when your tests get angry</li>
<li>Coverage</li>
<li>xunit, for your continual integration pleasure</li>
<li>Profiling</li>
</ul>
</li>
</ul></div>
</section>
<div id="footer">
<div class="inner">
<div class="container">
<hr/>
<footer id="page_footer">
<section id="page_sponsors">
<h3>Sponsors</h3>
<a href="http://www.newrelic.com/"><img alt="New Relic, Inc." src="../../../media/cache/ad/9c/ad9ca4f829a01fbf5d9c3915d47fd26a.jpg"/></a>
<a href="http://cmgdigital.com/"><img alt="CMG Digital" src="../../../media/cache/f0/d7/f0d758d236ec6dc4b164c730a8e69bdd.jpg"/></a>
<a href="http://www.revsys.com/"><img alt="Revolution Systems" src="../../../media/cache/7d/bf/7dbfe4e3b375fb938cef12c7e756b2fa.jpg"/></a>
<a href="http://www.jetbrains.com/pycharm/"><img alt="Jet Brains" src="../../../media/cache/87/66/87664ff9a841cb55780a33310824b904.jpg"/></a>
<a href="http://www.caktusgroup.com/"><img alt="Caktus Consulting Group, LLC" src="../../../media/cache/be/e4/bee4e0b8539a7dfd3895a00bd1f0f638.jpg"/></a>
<a href="http://www.webcubecms.com/"><img alt="Web Cube" src="../../../media/cache/f8/a4/f8a473da2393bfb101699663b8abc553.jpg"/></a>
<a href="http://www.chicagodjango.com/"><img alt="Imaginary Landscape, LLC" src="../../../media/cache/32/7f/327fc581684a89a146cb9d7edd811ebe.jpg"/></a>
<a href="http://www.github.com/"><img alt="GitHub" src="../../../media/cache/6c/bf/6cbf65587c1e36b49317514ae45a1254.jpg"/></a>
<a href="https://www.counsyl.com/"><img alt="Counsyl" src="../../../media/cache/6b/46/6b46a0cd033de096b0ef067d8259820a.jpg"/></a>
<a href="http://caci.com./"><img alt="CACI" src="../../../media/cache/b2/37/b2370064505dcb72291927c0a73467bc.jpg"/></a>
<a href="http://www.teamcarney.com/default.aspx?utm_source=djangocon&utm_medium=banner&utm_campaign=djangocon"><img alt="Carney" src="../../../media/cache/8b/4b/8b4bb5bf17d464c85f27a09a59d0e274.jpg"/></a>
<a href="http://celerity.com/"><img alt="Celerity" src="../../../media/cache/da/1f/da1f620155d4b81266888cb4ca6fad1c.jpg"/></a>
<a href="http://lab305.com/"><img alt="Lab 305" src="../../../media/cache/07/48/0748738521108c82f10fe19726e37849.jpg"/></a>
<a href="http://www.wisertogether.com/"><img alt="Wiser Together" src="../../../media/cache/37/5a/375a48e8fcecb60a7a89d3e74c236367.jpg"/></a>
<a href="http://www.mozilla.com/"><img alt="Mozilla" src="../../../media/cache/4c/a4/4ca41c7eee1175790a957bafb4461b84.jpg"/></a>
<a href="http://tryolabs.com/"><img alt="Tryolabs" src="../../../media/cache/e5/f9/e5f9d4bf7df2edc3b8d632246b90da8f.jpg"/></a>
<a href="http://socialcodeinc.com/"><img alt="SocialCode" src="../../../media/cache/e6/c6/e6c6e0e96aabfc673739e196a3f42497.jpg"/></a>
<a href="http://toastdriven.com/"><img alt="Toast Driven" src="../../../media/cache/60/c0/60c0674b42a339f11f6ae9cf32401556.jpg"/></a>
<a href="http://www.devsar.com/"><img alt="Devsar" src="../../../media/cache/74/44/74448dd5c58c1499811cfdaded3daf3b.jpg"/></a>
<a href="http://lincolnloop.com/"><img alt="Lincoln Loop" src="../../../media/cache/ad/83/ad831d1142c5a4cf59b7e943e5398ee6.jpg"/></a>
<a href="http://www.stickermule.com/"><img alt="Sticker Mule" src="../../../media/cache/ef/39/ef3954931c41170fe37abde34dda6c29.jpg"/></a>
<a href="http://unifiedsocial.com/"><img alt="Unified" src="../../../media/cache/0a/59/0a5923d4975f4326bead3e38de0c50db.jpg"/></a>
<a href="http://theopenbastion.com/"><img alt="The Open Bastion" src="../../../media/cache/12/34/1234b43bbc5a7db6efd6a2cdcaa6ca90.jpg"/></a>
<a href="http://www.chicagodjango.com/"><img alt="Imaginary Landscape" src="../../../media/cache/84/81/8481bde3f62f559916ba24b83d59ac6c.jpg"/></a>
</section>
<hr/>
<p>DjangoCon US 2012 is a production of <a href="http://theopenbastion.com">The Open Bastion</a>.</p>
<p><strong>Django</strong> is a registered trademark of the <a href="http://djangoproject.com/foundation">Django Software Foundation</a>.</p>
<p>Questions? Comments? <a href="mailto:[email protected]">[email protected]</a>.</p>
</footer>
</div>
</div>
</div>
<script src="../../../static/pinax/js/jquery-1.7.1.min.js"></script>
<script src="../../../static/pinax/js/jquery.form.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-alert.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-modal.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-button.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-carousel.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-collapse.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-dropdown.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-scrollspy.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-tab.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-tooltip.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-popover.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-transition.js"></script>
<script src="../../../static/bootstrap/js/bootstrap-typeahead.js"></script>
<script src="../../../static/pinax/js/theme.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a.bookmark").live("click", function() {
aElem = $(this);
instructions = aElem.next(".instructions")
$.ajax({
type: "POST",
url: this.href,
data: "action=add;csrfmiddlewaretoken=844d93ba92ff165d207fd1c6c0c115f7",
success: function() {
aElem.removeClass("bookmark");
aElem.addClass("bookmarked");
instructions.html("← click to unbookmark");
},
error: function(xhr, options, error) {
alert(xhr.status);
}
});
return false;
});
$("a.bookmarked").live("click", function() {
aElem = $(this);
instructions = aElem.next(".instructions")
$.ajax({
type: "POST",
url: this.href,
data: "action=delete;csrfmiddlewaretoken=844d93ba92ff165d207fd1c6c0c115f7",
success: function(response) {
aElem.removeClass("bookmarked");
aElem.addClass("bookmark");
instructions.html("← click to bookmark")
},
error: function(xhr, options, error) {
alert(xhr.status);
}
});
return false;
});
});
</script>
</body>
</html>