~landscape/zope3/ztk-1.1.3

« back to all changes in this revision

Viewing changes to src/zope/testing/testrunner/testrunner-repeat.txt

  • Committer: Thomas Hervé
  • Date: 2009-09-21 06:45:37 UTC
  • mfrom: (7.1.2 newer-zope-testing)
  • Revision ID: thomas@canonical.com-20090921064537-zcfyuv32hxj9eah0
Merge newer-zope-testing [a=sidnei] [f=429702] [r=therve,free.ekayanaka]

Update zope.testing to 3.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Repeating Tests
 
2
===============
 
3
 
 
4
The --repeat option can be used to repeat tests some number of times.
 
5
Repeating tests is useful to help make sure that tests clean up after
 
6
themselves.
 
7
 
 
8
    >>> import os.path, sys
 
9
    >>> directory_with_tests = os.path.join(this_directory, 'testrunner-ex')
 
10
    >>> defaults = [
 
11
    ...     '--path', directory_with_tests,
 
12
    ...     '--tests-pattern', '^sampletestsf?$',
 
13
    ...     ]
 
14
 
 
15
    >>> sys.argv = 'test --layer 112 --layer UnitTests --repeat 3'.split()
 
16
    >>> from zope.testing import testrunner
 
17
    >>> testrunner.run_internal(defaults)
 
18
    Running samplelayers.Layer112 tests:
 
19
      Set up samplelayers.Layerx in 0.000 seconds.
 
20
      Set up samplelayers.Layer1 in 0.000 seconds.
 
21
      Set up samplelayers.Layer11 in 0.000 seconds.
 
22
      Set up samplelayers.Layer112 in 0.000 seconds.
 
23
    Iteration 1
 
24
      Ran 34 tests with 0 failures and 0 errors in 0.010 seconds.
 
25
    Iteration 2
 
26
      Ran 34 tests with 0 failures and 0 errors in 0.010 seconds.
 
27
    Iteration 3
 
28
      Ran 34 tests with 0 failures and 0 errors in 0.010 seconds.
 
29
    Running zope.testing.testrunner.layer.UnitTests tests:
 
30
      Tear down samplelayers.Layer112 in N.NNN seconds.
 
31
      Tear down samplelayers.Layerx in N.NNN seconds.
 
32
      Tear down samplelayers.Layer11 in N.NNN seconds.
 
33
      Tear down samplelayers.Layer1 in N.NNN seconds.
 
34
      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
35
    Iteration 1
 
36
      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
 
37
    Iteration 2
 
38
      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
 
39
    Iteration 3
 
40
      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
 
41
    Tearing down left over layers:
 
42
      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
43
    Total: 226 tests, 0 failures, 0 errors in N.NNN seconds.
 
44
    False
 
45
 
 
46
The tests are repeated by layer.  Layers are set up and torn down only
 
47
once.