@@ -28,8 +28,8 @@ it with different parameters during each loop iteration.
2828The following describes each section and their loop capability and behaviors:
2929
3030``CommonSetup ``/``CommonCleanup ``
31- Common setup and cleanup sections are unique within each test script . They
32- are run only once per test script execution, and are not loopable.
31+ Common setup and cleanup sections are unique within each TestScript . They
32+ are run only once per TestScript execution, and are not loopable.
3333
3434 ``subsection ``
3535 Subsections within ``CommonSetup `` and ``CommonCleanup `` are loopable.
@@ -38,12 +38,12 @@ The following describes each section and their loop capability and behaviors:
3838
3939``Testcase ``
4040 Testcases are loopable. Each iteration of a looping ``Testcase `` is reported
41- individually as new test case instances with a different ``uid ``. When a
41+ individually as new `` Testcase `` instances with a different ``uid ``. When a
4242 ``Testcase `` is looped, and all of its contents (setup, tests, and cleanup) are
4343 run fully per each iteration.
4444
4545 ``setup ``/``cleanup ``
46- Setup and cleanup sections within each test case is unique, and are run
46+ Setup and cleanup sections within each Testcase is unique, and are run
4747 only once per ``Testcase ``. They cannot be looped individually, but
4848 if their parent ``Testcase `` is looped, then they are run once per
4949 ``Testcase `` iteration.
@@ -52,9 +52,9 @@ The following describes each section and their loop capability and behaviors:
5252 Test sections within ``Testcase `` are loopable individually. Each
5353 iteration has its own unique id and is reported as a new test
5454 section. When a looping ``test `` section's parent ``Testcase `` is
55- looped, the resulting loops are multiplicative. E.g.: if a test case is
56- looped ``2x``and contains a test that is also looped ``2x ``, that
57- test would loop ``2x `` per test case loop iteration.
55+ looped, the resulting loops are multiplicative. E.g.: if a Testcase is
56+ looped ``2x `` and contains a test that is also looped ``2x ``, that
57+ test would loop ``2x `` per Testcase loop iteration.
5858
5959.. hint ::
6060
@@ -93,27 +93,27 @@ section object is then instantiated once for each iteration.
9393 def looped_subsection (self ):
9494 pass
9595
96- # Defining a test case that loops
96+ # Defining a Testcase that loops
9797 # ----------------------------------
98- # This test case also contains a test section that is looped twice
98+ # This Testcase also contains a test section that is looped twice
9999 @aetest.loop (uids = [' testcase_one' , ' testcase_two' ])
100100 class Testcase (aetest .Testcase ):
101101
102- # Setup section of this test case is run once
103- # every time the test case is looped.
102+ # Setup section of this Testcase is run once
103+ # every time the Testcase is looped.
104104 @aetest.setup
105105 def setup (self ):
106106 pass
107107
108108 # Looped test section
109- # both iterations are run per test case iteration
109+ # both iterations are run per Testcase iteration
110110 @aetest.loop (uids = [' test_one' , ' test_two' ])
111111 @aetest.test
112112 def test (self ):
113113 pass
114114
115- # Cleanup section of this test case is run once
116- # every time the test case is looped.
115+ # Cleanup section of this Testcase is run once
116+ # every time the Testcase is looped.
117117 @aetest.cleanup
118118 def cleanup (self ):
119119 pass
@@ -216,7 +216,7 @@ looped section is then driven to potentially do something different.
216216
217217 from pyats import aetest
218218
219- # Loop this test case with a loop parameter named "a"
219+ # Loop this Testcase with a loop parameter named "a"
220220 # and set it to value 2 for the first iteration,
221221 # and 3 for the second iteration
222222 @aetest.loop (a = [2 , 3 ])
@@ -229,7 +229,7 @@ looped section is then driven to potentially do something different.
229229 # this test prints the exponential of two inputs, a and b
230230 print (" %s ^ %s = %s " % (a, b, a** b))
231231
232- # The output of the test case would look like this:
232+ # The output of the Testcase would look like this:
233233 # 2 ^ 8 = 256
234234 # 2 ^ 9 = 512
235235 # 3 ^ 8 = 6561
@@ -449,7 +449,7 @@ would normally expect it to:
449449 def test_two (self , b ):
450450 print (' b = %s ' % b)
451451
452- # The output of the test case would be:
452+ # The output of the Testcase would be:
453453 # returning [1, 2, 3]
454454 # a = 1
455455 # a = 2
@@ -482,7 +482,7 @@ Dynamic Loop Marking
482482--------------------
483483
484484So far, all loop examples focus on defining the ``@loop `` decorator directly within the
485- test scripts . E.g., the ``@loop `` decorators are coded as part of the test script.
485+ TestScripts . E.g., the ``@loop `` decorators are coded as part of the TestScript.
486486However, it is also possible to dynamically mark sections for looping during
487487runtime, e.g., creating loops based on information that is only available during
488488a script’s run. To do this, use the ``loop.mark() `` function.
@@ -506,7 +506,7 @@ a script’s run. To do this, use the ``loop.mark()`` function.
506506 aetest.loop.mark(self .simple_test, uids = [' test_one' , ' test_two' ])
507507
508508 # Note: the simple_test section is not directly marked for looping
509- # instead, during runtime, its testcase 's setup section marks it for
509+ # instead, during runtime, its Testcase 's setup section marks it for
510510 # looping dynamically.
511511
512512 @aetest.test
@@ -515,7 +515,7 @@ a script’s run. To do this, use the ``loop.mark()`` function.
515515 # by using the internal parameter "section"
516516 print (" current section: %s " % section.uid)
517517
518- # Output of this test case
518+ # Output of this Testcase
519519 # current section: test_one
520520 # current section: test_two
521521 #
@@ -656,9 +656,9 @@ wish to customize loop behavior, it is possible to extend and override it.
656656
657657
658658 # This loop generator can be used as the @loop and loop.mark() argument.
659- # Let's define a looped test case with it.
659+ # Let's define a looped Testcase with it.
660660
661- # Looping this test case with a custom generator, and a=1, b=5
661+ # Looping this Testcase with a custom generator, and a=1, b=5
662662 @aetest.loop (generator = DemoGenerator, a = 1 , b = 5 )
663663 class Testcase (aetest .Testcase ):
664664
@@ -668,7 +668,7 @@ wish to customize loop behavior, it is possible to extend and override it.
668668 def test (self , number ):
669669 print (' current number: %s ' % number)
670670
671- # Output of this test case
671+ # Output of this Testcase
672672 # current number: 1
673673 # current number: 2
674674 # current number: 3
0 commit comments