I'm using HTMLRunner 1.1.1 which is compatible with python 3.5
my code is :
dir=os.getcwd()
photo_tests=unittest.TestLoader().loadTestsFromTestCase(Photo_Tests.Photo_Test)
photo_tests_suit=unittest.TestSuite([photo_tests])
outfile=open(dir+"/Phototests.html","w")
runner=HTMLTestRunner.HTMLTestRunner(stream=outfile,title="Tests with facebook photos")
runner.run(photo_tests_suit)
Each time,when I run it, I get an error:
File "/home/akop/py_workspace/MacPaw_FB/Photos_tests/TestsWithreport.py", line 13, in <module>
runner.run(photo_tests_suit)
File "/usr/lib/python3.5/HTMLTestRunner.py", line 601, in run
self.generateReport(test, result)
File "/usr/lib/python3.5/HTMLTestRunner.py", line 658, in generateReport
self.stream.write(output.encode('utf8'))
TypeError: write() argument must be str, not bytes