G
gtb
The lines
if __name__ == 'main':
someClass().fn()
appear at the end of many examples I see. Is this to cause a .class
file to be generated?
The last line of the sample below has a string parameter. When I
mimicked this I got an error stating that the class constructor did
not take an arg, which seems correct.
Thanks,
gtb
# Generated by MaxQ [com.bitmechanic.maxq.generator.CompactGenerator]
from CompactTest import CompactTest
class MaxQTest(CompactTest):
# Recorded test actions.
def runTest(self):
self.msg('Test started')
# ^^^ Insert new recordings here. (Do not remove this line.)
# Code to load and run the test
if __name__ == 'main':
MaxQTest('MaxQTest').Run()
if __name__ == 'main':
someClass().fn()
appear at the end of many examples I see. Is this to cause a .class
file to be generated?
The last line of the sample below has a string parameter. When I
mimicked this I got an error stating that the class constructor did
not take an arg, which seems correct.
Thanks,
gtb
# Generated by MaxQ [com.bitmechanic.maxq.generator.CompactGenerator]
from CompactTest import CompactTest
class MaxQTest(CompactTest):
# Recorded test actions.
def runTest(self):
self.msg('Test started')
# ^^^ Insert new recordings here. (Do not remove this line.)
# Code to load and run the test
if __name__ == 'main':
MaxQTest('MaxQTest').Run()