Revisión | fe53471457f20c77dc0cff8ab0e8376375aa054a (tree) |
---|---|
Tiempo | 2018-11-12 01:16:33 |
Autor | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
small textual refactoring
@@ -45,7 +45,7 @@ | ||
45 | 45 | ATS = pm.load(os.path.splitext(os.path.basename(ATSfile))[0], extend_path=True) |
46 | 46 | |
47 | 47 | # Run the ATSes in the file |
48 | - for ats in discover(ATS.__dict__): | |
48 | + for ats in discover(ATS.__dict__): # GAM XXX: Why is this loop here? Should it be in "ATS" (representing the file) ...? | |
49 | 49 | test_count+=1 |
50 | 50 | run_ATS(ats, probe=probe) |
51 | 51 |
@@ -33,6 +33,7 @@ | ||
33 | 33 | |
34 | 34 | |
35 | 35 | class Config: |
36 | + """ .. todo:: Doc Config""" | |
36 | 37 | |
37 | 38 | def __init__(self, cfgdir=None, cwd=None, argparse=False): |
38 | 39 | """Create a Config object; |
@@ -93,9 +93,10 @@ | ||
93 | 93 | from selenium import webdriver |
94 | 94 | from selenium.webdriver.common.desired_capabilities import DesiredCapabilities |
95 | 95 | |
96 | - HACK = r"~/work/Pathways/TMP/geckodriver" # XXX | |
97 | - logger.debug("XXX HACK=%s", HACK) # XXX | |
96 | + # Use 'BIN_PATH' Cfg value - After fixing :ref:`bug-cgfput` # XXX | |
97 | + HACK = r"~/work/Pathways/TMP/" + 'geckodriver' # XXX | |
98 | 98 | ff_driver = os.path.expanduser(os.path.expandvars(HACK)) # XXX |
99 | + logger.debug("HACK: ff_driver=%s", ff_driver ) # XXX | |
99 | 100 | |
100 | 101 | caps = DesiredCapabilities.FIREFOX |
101 | 102 | caps["marionette"] = True |
@@ -16,8 +16,7 @@ | ||
16 | 16 | |
17 | 17 | probeTracer |
18 | 18 | Accessable via ``probe.trace.FUNC`` and should be used to *track & trace* the ATS (testing progress) |
19 | - within the pathways-framework. Both in this file and others. | |
20 | - moduleLogger | |
19 | + within the pathways-framework. Both in this file and other moduleLogger | |
21 | 20 | As in most modules, it is possible to *"debug"* this module too; via the ``logger.FUNC`` interface. |
22 | 21 | """ |
23 | 22 |
@@ -64,12 +64,16 @@ | ||
64 | 64 | |
65 | 65 | def discover(d): |
66 | 66 | """Find all ATSes in a module-or-frame dict, and return a list, sorted in code-order""" |
67 | + | |
67 | 68 | atses = [ func for (name, func) in d.items() if name.startswith('ATS_') and callable(func) ] |
68 | 69 | atses.sort(key=lambda f : f.__code__.co_firstlineno) # Sort them to file order! |
70 | + | |
69 | 71 | probes.currentProbe.trace.info("Discovered: %s", ", ".join(ats.__name__ for ats in atses)) |
72 | + | |
70 | 73 | return atses |
71 | 74 | |
72 | 75 | |
76 | + | |
73 | 77 | def autorun(): |
74 | 78 | """Automatically run all ATSes in the current ATS-file. Typically used at (the bottom of) each ATS, to run that test-file manually: |
75 | 79 |