File tree Expand file tree Collapse file tree 7 files changed +18
-18
lines changed
Expand file tree Collapse file tree 7 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 44
55A very simple test script example which include:
66 common_setup
7- tescases
7+ testcases
88 common_cleanup
99
1010The purpose of this sample test script is to demonstrate
1616
1717import logging
1818
19- from ats import aetest
19+ from pyats import aetest
2020
2121# get your logger for your script
2222log = logging .getLogger (__name__ )
@@ -29,7 +29,7 @@ class common_setup(aetest.CommonSetup):
2929 and serves to perform all the "common" setups required for your script.
3030
3131 Define a common setup section by subclassing aetest.CommonSetup class.
32- It's a good conventiont to name it 'common_setup', as this section's
32+ It's a good convention to name it 'common_setup', as this section's
3333 reporting ID is always 'common_setup'.
3434
3535 Each common setup may have 1+ subsections. Consider a subsection as a
@@ -138,7 +138,7 @@ class common_cleanup(aetest.CommonCleanup):
138138 cleanup the lingering mess left behind in the testbed/devices under test.
139139
140140 Define a common cleanup section by subclassing aetest.CommonCleanup class.
141- It's a good conventiont to name it 'common_cleanup', as this section's
141+ It's a good convention to name it 'common_cleanup', as this section's
142142 reporting ID is always 'common_cleanup'.
143143
144144 Similar to its counterpart, common cleanup may have 1+ subsections.
Original file line number Diff line number Diff line change 1212'''
1313
1414import os
15- from ats .easypy import run
15+ from pyats .easypy import run
1616
1717def main ():
1818 '''
1919 main() function is the default easypy job file entry point.
2020 '''
2121
22- # eind the location of the script in relation to the job file
22+ # find the location of the script in relation to the job file
2323 script_path = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
2424 testscript = os .path .join (script_path , 'basic_example_script.py' )
2525
Original file line number Diff line number Diff line change 8080import logging
8181import argparse
8282
83- from ats import aetest
84- from ats .log .utils import banner
83+ from pyats import aetest
84+ from pyats .log .utils import banner
8585
8686# import local library
8787from libs import local_library
@@ -218,7 +218,7 @@ class CommonSetup(aetest.CommonSetup):
218218 #*
219219 #* defining the most simplistic subsections.
220220 #*
221- #* subsection sare defined by applying the @aetest.subsection decorator
221+ #* subsections are defined by applying the @aetest.subsection decorator
222222 #* to a method. This marks it as a subsection. The function name is used
223223 #* as the subsection uid/name.
224224 @aetest .subsection
@@ -270,7 +270,7 @@ def a_simple_subsection(self):
270270 # let's provide a result and a msg
271271 self .passed ('my example subsection is so awesome it always passes!' )
272272
273- # the following code is simply never excuted
273+ # the following code is simply never executed
274274 logger .info ('I am never executed :-(' )
275275
276276 #******************************
Original file line number Diff line number Diff line change 3333import logging
3434import argparse
3535
36- from ats .easypy import run
36+ from pyats .easypy import run
3737
3838# import logic statements from datastructures module
39- from ats .datastructures .logic import And , Or , Not
39+ from pyats .datastructures .logic import And , Or , Not
4040
4141#*******************************************************************************
4242#* ENVIRONMENT
Original file line number Diff line number Diff line change 1919logger = logging .getLogger (__name__ )
2020
2121#**********************************
22- #* Function & Class Defitions
22+ #* Function & Class Definitions
2323#*
2424def function_supporting_step (step ):
2525 '''function_supporting_step
2626
2727 This function demonstrate the use of steps within function APIs. This
2828 enables smaller breakdown of functions into smaller steps, and thus provides
29- finer granuality in your testscript logs.
29+ finer granularity in your testscript logs.
3030
3131 Arguments
3232 ---------
Original file line number Diff line number Diff line change 1010#
1111# import statements
1212#
13- from ats import aetest
13+ from pyats import aetest
1414import logging
1515
1616#
Original file line number Diff line number Diff line change 4848import logging
4949import argparse
5050
51- from ats import aetest
52- from ats .log .utils import banner
51+ from pyats import aetest
52+ from pyats .log .utils import banner
5353
5454#**********************************
5555#* Import From Base Script
120120class CommonSetup (base_example .CommonSetup ):
121121 '''Common Setup Section
122122
123- This CommonSetup inherites from the base_example.CommonSetup, and adds more
123+ This CommonSetup inherits from the base_example.CommonSetup, and adds more
124124 local subsections to it.
125125
126126 '''
You can’t perform that action at this time.
0 commit comments