|
1 | 1 | import datetime
|
2 | 2 | import json
|
3 | 3 | import os
|
4 |
| - |
5 |
| -import pytest |
6 | 4 | import re
|
7 | 5 | import shutil
|
8 | 6 |
|
9 |
| -from . import __version__ |
10 |
| -from .util import cleanup_unserializable, get_scripts |
11 |
| - |
12 |
| -from jinja2 import Environment, FileSystemLoader |
13 |
| - |
| 7 | +import pytest |
14 | 8 | from _pytest.pathlib import Path
|
| 9 | +from jinja2 import Environment |
| 10 | +from jinja2 import FileSystemLoader |
| 11 | + |
| 12 | +from . import __version__ |
| 13 | +from .util import cleanup_unserializable |
| 14 | +from .util import get_scripts |
15 | 15 |
|
16 | 16 |
|
17 |
| -class BaseReport(object): |
| 17 | +class BaseReport: |
18 | 18 | def __init__(self, report_path, config):
|
19 | 19 | _plugin_path = os.path.dirname(__file__)
|
20 | 20 | self._report_absolute_path = Path(report_path).absolute()
|
@@ -124,7 +124,7 @@ def pytest_runtest_logreport(self, report):
|
124 | 124 |
|
125 | 125 | class NextGenReport(BaseReport):
|
126 | 126 | def __init__(self, report_path, config):
|
127 |
| - super(NextGenReport, self).__init__(report_path, config) |
| 127 | + super().__init__(report_path, config) |
128 | 128 | self._assets_path = Path(self._report_path, "assets")
|
129 | 129 | self._assets_path.mkdir(parents=True, exist_ok=True)
|
130 | 130 | self._scripts_dest_path = Path(self._report_path, "scripts")
|
@@ -172,7 +172,7 @@ def _write_test_data(self):
|
172 | 172 |
|
173 | 173 | class NextGenSelfContainedReport(BaseReport):
|
174 | 174 | def __init__(self, report_path, config):
|
175 |
| - super(NextGenSelfContainedReport, self).__init__(report_path, config) |
| 175 | + super().__init__(report_path, config) |
176 | 176 |
|
177 | 177 | def _generate_report(self):
|
178 | 178 | self._template = self._read_template(
|
|
0 commit comments