ArturSpirin/test_junkie

FileNotFoundError: [Errno 2] No such file or directory: report_template.html

ArturSpirin opened this issue · 0 comments

  1. Python version python --version >> All
  2. Test Junkie version pip show test_junkie >> 0.4a0
  3. Command used, if running via terminal >> N/A
  4. Smallest code snippet that can reproduce the issue
    Any suites that are executed with the html_report flag
@Suite()
class Example:

    @test()
    def a(self):
        pass

    @test()
    def b(self):
        pass

runner = Runner([Example], html_report="path/to/report.html")
runner.run()

Expected behaviour

Should parse out the default html template and create a new html report at path/to/report.html

Actual behaviour

The default HTML template, used to create the report, is actually not getting distributed with the Python package thus the error such as

Traceback (most recent call last):
  File "C:/Users/aspir/Desktop/test.py", line 30, in <module>
    runner.run()
  File "C:\Python36\lib\site-packages\test_junkie\runner.py", line 257, in run
    self.__create_html_report(reporter)
  File "C:\Python36\lib\site-packages\test_junkie\runner.py", line 117, in __create_html_report
    reporter.generate_html_report(self.__kwargs.get("html_report"))
  File "C:\Python36\lib\site-packages\test_junkie\reporter\reporter.py", line 36, in generate_html_report
    with open(self.html_template, "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Python36\\lib\\site-packages\\test_junkie\\reporter\\report_template.html'