예제 #1
0
def pytest_sessionfinish(session, exitstatus):
    failed_tests_template = template_env.get_template('failed_browser_tests.html')
    outfile = log_path.join('failed_browser_tests.html')

    # Clean out any old reports
    try:
        outfile.remove(ignore_errors=True)
    except ENOENT:
        pass

    # Generate a new one if needed
    if failed_test_tracking['tests']:
        failed_tests_report = failed_tests_template.render(**failed_test_tracking)
        outfile.write(failed_tests_report)
예제 #2
0
def pytest_sessionfinish(session, exitstatus):
    failed_tests_template = template_env.get_template('failed_browser_tests.html')
    outfile = log_path.join('failed_browser_tests.html')

    # Clean out any old reports
    try:
        outfile.remove(ignore_errors=True)
    except ENOENT:
        pass

    # Generate a new one if needed
    if failed_test_tracking['tests']:
        failed_tests_report = failed_tests_template.render(**failed_test_tracking)
        outfile.write(failed_tests_report)
예제 #3
0
 def generate(self):
     template = template_env.get_template('event_testing.html')
     return template.render(
         test_name=self.test_name,
         registered_events=self.registered_events,
         all_events=self.all_events)
예제 #4
0
 def generate(self, filename):
     template = template_env.get_template('event_testing.html')
     with open(filename, "w") as outfile:
         outfile.write(template.render(events=self.events))
예제 #5
0
 def generate(self, filename):
     template = template_env.get_template('event_testing.html')
     with open(filename, "w") as outfile:
         outfile.write(template.render(events=self.events))