← Back to team overview

sikuli-driver team mailing list archive

[Question #290720]: htmltestrunner output required for my program

 

New question #290720 on Sikuli:
https://answers.launchpad.net/sikuli/+question/290720

I'm reading from database and comparing values with current data. Values are stored in dictionaries. The problem is :
below code is working fine for test_map with for loop. But when i tried changing it with my requirement its not giving any
output on result.html. 

In the below code i just assigned values for mastdict and curdict for the first level execution.

Am i missing anything ?? or htmltestrunner wont support for defined functions outputs ?

import unittest
import HTMLTestRunner
import Automod



class FWDSizingCustomworkload(unittest.TestCase):
        longMessage = True

def make_method(name, a, b):
        def _method(self, a=a, b=b):
                self.assertEqual(a, b, name)
        return _method

def main():
        tests_map = {
                'foo': [1, 1],
                'bar': [1, 2],
                'baz': [5, 5]
        }
        #(masdict,curdict)=Automod.readDB()
        masdict=1
        curdict=1
        #for name, params in tests_map.iteritems():
                #test_name = "test_gen_%s" % name
        test_name="RKG"
        _method = make_method(test_name, masdict, curdict)
                #_method = make_method(test_name, params[0], params[1])
        setattr(FWDSizingCustomworkload, test_name, _method)
        suite = unittest.TestLoader().loadTestsFromTestCase(FWDSizingCustomworkload)
        unittest.TextTestRunner(verbosity=2)
        with open('results.html', 'w') as html_file:
                runner = HTMLTestRunner.HTMLTestRunner(stream=html_file,
                                               title='demo title',
                                               description='demo descr')
                runner.run(suite)

if __name__ == '__main__':
        main()


-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.