-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsb.test-module.html
More file actions
704 lines (677 loc) · 27.8 KB
/
csb.test-module.html
File metadata and controls
704 lines (677 loc) · 27.8 KB
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>csb.test</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="csb-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>CSB v1.2.5.d7fd331</th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="csb-module.html">Package csb</a> ::
Package test
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="csb.test-module.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package test</h1><p class="nomargin-top"><span class="codelink"><a href="csb.test-pysrc.html">source code</a></span></p>
<p>This is a top level package, hosting the entire CSB test framework. It
is divided into several major parts:</p>
<ul>
<li>
test cases, located under csb.test.cases
</li>
<li>
test data, in <code>/csb/test/data</code> (not a package)
</li>
<li>
test console, in <code>/csb/test/app.py</code>
</li>
</ul>
<p>This module, csb.test, contains all the glue-code functions, classes
and decorators you would need in order to write tests for CSB.</p>
<ol start="1">
<li>
Configuration and Tree
<p><a href="csb.test.Config-class.html" class="link">Config</a> is a
common config object shared between CSB tests. Each config instance
contains properties like:</p>
<ul>
<li>
data: the data folder, automatically discovered and loaded in
csb.test.Config.DATA at module import time
</li>
<li>
temp: a default temp folder, which test cases can use
</li>
</ul>
<p>Each <a href="csb.test.Config-class.html" class="link">Config</a>
provides a convenient way to retrieve files from
<code>/csb/test/data</code>. Be sure to check out <a
href="csb.test.Config-class.html#getTestFile"
class="link">Config.getTestFile</a> and <a
href="csb.test.Config-class.html#getPickle"
class="link">Config.getPickle</a>. In case you need a temp file, use
<a href="csb.test.Config-class.html#getTempStream"
class="link">Config.getTempStream</a> or have a look at <a
href="csb.io.TempFile-class.html" class="link">csb.io.TempFile</a>
and <a href="csb.io.TempFolder-class.html"
class="link">csb.io.TempFolder</a>.</p>
<p>All test data files should be placed in the <code>data</code>
folder. All test modules must be placed in the root package:
csb.test.cases. There is a strict naming convention for test modules:
the name of a test module should be the same as the name of the CSB
API package it tests. For example, if you are writing tests for
<code>csb/bio/io/__init__.py</code>, the test module must be
<code>csb/test/cases/bio/io/__init__.py</code>.
<code>csb.test.cases</code> is the root package of all test modules
in CSB.</p>
</li>
<li>
Writing Tests
<p>Writing a test is easy. All you need is to import csb.test and
then create your own test cases, derived from <a
href="csb.test.Case-class.html" class="link">csb.test.Case</a>:</p>
<pre class="py-doctest">
<span class="py-prompt">>>> </span><span class="py-keyword">import</span> csb.test
<span class="py-prompt">>>> </span>@csb.test.unit
<span class="py-output"> class TestSomeClass(csb.test.Case):</span>
<span class="py-output"> def setUp(self):</span>
<span class="py-output"> super(TestSomeClass, self).setUp()</span>
<span class="py-output"> # do something with self.config here...</span></pre>
<p>In this way your test case instance is automatically equipped with
a reference to the test config, so your test method can be:</p>
<pre class="py-doctest">
<span class="py-prompt">>>> </span>@csb.test.unit
<span class="py-output"> class TestSomeClass(csb.test.Case):</span>
<span class="py-output"> def testSomeMethod(self):</span>
<span class="py-output"> myDataFile = self.config.getTestFile('some.file')</span>
<span class="py-output"> self.assert...</span></pre>
<p>The "unit" decorator marks a test case as a collection
of unit tests. All possibilities are: <a
href="csb.test-module.html#unit" class="link">csb.test.unit</a>, <a
href="csb.test-module.html#functional"
class="link">csb.test.functional</a>, <a
href="csb.test-module.html#custom" class="link">csb.test.custom</a>,
and <a href="csb.test-module.html#regression"
class="link">csb.test.regression</a>.</p>
<p>Writing custom (a.k.a. "data", "slow",
"dynamic") tests is a little bit more work. Custom tests
must be functions, not classes. Basically a custom test is a
function, which builds a unittest.TestSuite instance and then returns
it when called without arguments.</p>
<p>Regression tests are usually created in response to reported bugs.
Therefore, the best practice is to mark each test method with its
relevant bug ID:</p>
<pre class="py-doctest">
<span class="py-prompt">>>> </span>@csb.test.regression
<span class="py-output"> class SomeClassRegressions(csb.test.Case)</span>
<span class="py-output"> def testSomeFeature(self)</span>
<span class="py-output"> """</span>
<span class="py-output"> @see: [CSB 000XXXX] </span>
<span class="py-output"> """</span>
<span class="py-output"> # regression test body...</span></pre>
</li>
<li>
Style Guide:
<ul>
<li>
name test case packages as already described
</li>
<li>
group tests in csb.test.Case-s and name them properly
</li>
<li>
prefix test methods with "test", like
"testParser" - very important
</li>
<li>
use camelCase for methods and variables. This applies to all the
code under csb.test (including test) and does not apply to the
rest of the library!
</li>
<li>
for functional tests it's okay to define just one test method:
runTest
</li>
<li>
for unit tests you should create more specific test names, for
example: "testParseFile" - a unit test for some method
called "parse_file"
</li>
<li>
use csb.test decorators to mark tests as unit, functional,
regression, etc.
</li>
<li>
make every test module executable:
<pre class="literalblock">
if __name__ == '__main__':
csb.test.Console() # Discovers and runs all test cases in the module
</pre>
</li>
</ul>
</li>
<li>
Test Execution
<p>Test discovery is handled by <code>test builders</code> and a test
runner <code>app</code>. Test builders are subclasses of <a
href="csb.test.AbstractTestBuilder-class.html"
class="link">AbstractTestBuilder</a>. For every test type (unit,
functional, regression, custom) there is a corresponding test
builder. <a href="csb.test.AnyTestBuilder-class.html"
class="link">AnyTestBuilder</a> is a special builder which scans for
unit, regression and functional tests at the same time.</p>
<p>Test builder classes inherit the following test discovery
methods:</p>
<ul>
<li>
<code>loadTests</code> - load tests from a test namespace.
Wildcard namespaces are handled by <code>loadAllTests</code>
</li>
<li>
<code>loadAllTests</code> - load tests from the given namespace,
and from all sub-packages (recursive)
</li>
<li>
<code>loadFromFile</code> - load tests from an absolute file name
</li>
<li>
<code>loadMultipleTests</code> - calls <code>loadTests</code> for
a list of namespaces and combines all loaded tests in a single
suite
</li>
</ul>
<p>Each of those return test suite objects, which can be directly
executed with python's unittest runner.</p>
<p>Much simpler way to execute a test suite is to use our test app
(<code>csb/test/app.py</code>), which is simply an instance of <a
href="csb.test.Console-class.html"
class="link">csb.test.Console</a>:</p>
<pre class="literalblock">
$ python csb/test/app.py --help
</pre>
<p>The app has two main arguments:</p>
<ul>
<li>
test type - tells the app which TestBuilder to use for test
dicsovery ("any" triggers <a
href="csb.test.AnyTestBuilder-class.html"
class="link">AnyTestBuilder</a>, "unit" - <a
href="csb.test.UnitTestBuilder-class.html"
class="link">UnitTestBuilder</a>, etc.)
</li>
<li>
test namespaces - a list of "dotted" test modules, for
example:
<pre class="literalblock">
csb.test.cases.bio.io.* # io and sub-packages
csb.test.cases.bio.utils # only utils
. # current module
</pre>
</li>
</ul>
<p>In addition to running the app from the command line, you can run
it also programmatically by instantiating <a
href="csb.test.Console-class.html" class="link">csb.test.Console</a>.
You can construct a test console object by passing a list of test
namespace(s) and a test builder class to the Console's
constructor.</p>
</li>
<li>
Commit Policies
<p>Follow these guidelines when making changes to the repository:</p>
<ul>
<li>
<b>no bugs in "trunk"</b>: after fixing a bug or
implementing a new feature, make sure at least the default test
set passes by running the test console without any arguments.
This is equivalent to: app.py -t any
"csb.test.cases.*". (If no test case from this set
covers the affected code, create a test case first, as described
in the other policies)
</li>
<li>
<b>no recurrent issues</b>: when a bug is found, first write a
regression test with a proper "@see: BugID" tag in the
docstring. Run the test to make sure it fails. After fixing the
bug, run the test again before you commit, as required by the
previous policy
</li>
<li>
<b>test all new features</b>: there should be a test case for
every new feature we implement. One possible approach is to write
a test case first and make sure it fails; when the new feature is
ready, run the test again to make sure it passes
</li>
</ul>
</li>
</ol>
<hr />
<div class="fields"> <p><strong>Warning:</strong>
for compatibility reasons do NOT import and use the unittest module
directly. Always import unittest from csb.test, which is guaranteed
to be python 2.7+ compatible.
</p>
</div><!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Submodules</span></td>
</tr>
<tr><td class="summary">
<ul class="nomargin">
<li> <strong class="uidlink"><a href="csb.test.app-module.html">csb.test.app</a></strong>: <em class="summary">CSB Test Runner app.</em> </li>
</ul></td></tr>
</table>
<br />
<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Classes</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.AbstractTestBuilder-class.html" class="summary-name">AbstractTestBuilder</a><br />
This is a base class, defining a test loader which exposes the
<code>loadTests</code> method.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.AnyTestBuilder-class.html" class="summary-name">AnyTestBuilder</a><br />
Build a test suite of cases, marked as either unit, functional or
regression tests.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.Attributes-class.html" class="summary-name">Attributes</a>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.Case-class.html" class="summary-name">Case</a><br />
Base class, defining a CSB Test Case.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.Config-class.html" class="summary-name">Config</a><br />
General CSB Test Config.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.Console-class.html" class="summary-name">Console</a><br />
Build and run all tests of the specified namespace and kind.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.CustomTestBuilder-class.html" class="summary-name">CustomTestBuilder</a><br />
Build a test suite of cases, marked as custom tests.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.FunctionalTestBuilder-class.html" class="summary-name">FunctionalTestBuilder</a><br />
Build a test suite of cases, marked as functional tests.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.InvalidNamespaceError-class.html" class="summary-name">InvalidNamespaceError</a>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.RegressionTestBuilder-class.html" class="summary-name">RegressionTestBuilder</a><br />
Build a test suite of cases, marked as regression tests.
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="csb.test.UnitTestBuilder-class.html" class="summary-name">UnitTestBuilder</a><br />
Build a test suite of cases, marked as unit tests.
</td>
</tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Functions</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="csb.test-module.html#custom" class="summary-sig-name">custom</a>(<span class="summary-sig-arg">function</span>)</span><br />
A function decorator, used to mark functions which build custom
(dynamic) test suites when called.</td>
<td align="right" valign="top">
<span class="codelink"><a href="csb.test-pysrc.html#custom">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="csb.test-module.html#functional" class="summary-sig-name">functional</a>(<span class="summary-sig-arg">klass</span>)</span><br />
A class decorator, used to label functional test cases.</td>
<td align="right" valign="top">
<span class="codelink"><a href="csb.test-pysrc.html#functional">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="csb.test-module.html#regression" class="summary-sig-name">regression</a>(<span class="summary-sig-arg">klass</span>)</span><br />
A class decorator, used to label regression test cases.</td>
<td align="right" valign="top">
<span class="codelink"><a href="csb.test-pysrc.html#regression">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="csb.test-module.html#skip" class="summary-sig-name">skip</a>(<span class="summary-sig-arg">reason</span>,
<span class="summary-sig-arg">condition</span>=<span class="summary-sig-default">None</span>)</span><br />
Mark a test case or method for skipping.</td>
<td align="right" valign="top">
<span class="codelink"><a href="csb.test-pysrc.html#skip">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="csb.test-module.html#unit" class="summary-sig-name">unit</a>(<span class="summary-sig-arg">klass</span>)</span><br />
A class decorator, used to label unit test cases.</td>
<td align="right" valign="top">
<span class="codelink"><a href="csb.test-pysrc.html#unit">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Variables</span></td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="__package__"></a><span class="summary-name">__package__</span> = <code title="'csb.test'"><code class="variable-quote">'</code><code class="variable-string">csb.test</code><code class="variable-quote">'</code></code>
</td>
</tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td align="left" colspan="2" class="table-header">
<span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="custom"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">custom</span>(<span class="sig-arg">function</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="csb.test-pysrc.html#custom">source code</a></span>
</td>
</tr></table>
<p>A function decorator, used to mark functions which build custom
(dynamic) test suites when called.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>function</code></strong> (callable) - a callable object, which returns a dynamically compiled
<code>unittest.TestSuite</code></li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="functional"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">functional</span>(<span class="sig-arg">klass</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="csb.test-pysrc.html#functional">source code</a></span>
</td>
</tr></table>
<p>A class decorator, used to label functional test cases.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>klass</code></strong> (type) - a <code>unittest.TestCase</code> class type</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="regression"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">regression</span>(<span class="sig-arg">klass</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="csb.test-pysrc.html#regression">source code</a></span>
</td>
</tr></table>
<p>A class decorator, used to label regression test cases.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>klass</code></strong> (type) - a <code>unittest.TestCase</code> class type</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="skip"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">skip</span>(<span class="sig-arg">reason</span>,
<span class="sig-arg">condition</span>=<span class="sig-default">None</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="csb.test-pysrc.html#skip">source code</a></span>
</td>
</tr></table>
<p>Mark a test case or method for skipping.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>reason</code></strong> (str) - message</li>
<li><strong class="pname"><code>condition</code></strong> (bool/expression) - skip only if the specified condition is True</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<a name="unit"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">unit</span>(<span class="sig-arg">klass</span>)</span>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="csb.test-pysrc.html#unit">source code</a></span>
</td>
</tr></table>
<p>A class decorator, used to label unit test cases.</p>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>klass</code></strong> (type) - a <code>unittest.TestCase</code> class type</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="csb-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>CSB v1.2.5.d7fd331</th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Tue Jul 4 20:19:04 2017
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
// -->
</script>
</body>
</html>