htmlcmp 1.2.0__tar.gz → 1.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/PKG-INFO +1 -1
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/pyproject.toml +1 -1
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp/compare_output.py +1 -3
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp/compare_output_server.py +1 -2
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp/html_render_diff.py +2 -8
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp.egg-info/PKG-INFO +1 -1
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/tests/test_html_render_diff.py +0 -6
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/README.md +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/setup.cfg +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp/__init__.py +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp/common.py +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp/tidy_output.py +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp.egg-info/SOURCES.txt +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp.egg-info/dependency_links.txt +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp.egg-info/entry_points.txt +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp.egg-info/requires.txt +0 -0
- {htmlcmp-1.2.0 → htmlcmp-1.2.1}/src/htmlcmp.egg-info/top_level.txt +0 -0
|
@@ -241,9 +241,7 @@ def main():
|
|
|
241
241
|
parser = argparse.ArgumentParser()
|
|
242
242
|
parser.add_argument("a", type=Path, help="Path to the first directory")
|
|
243
243
|
parser.add_argument("b", type=Path, help="Path to the second directory")
|
|
244
|
-
parser.add_argument(
|
|
245
|
-
"--driver", choices=["chrome", "firefox", "phantomjs"], default="firefox"
|
|
246
|
-
)
|
|
244
|
+
parser.add_argument("--driver", choices=["chrome", "firefox"], default="firefox")
|
|
247
245
|
parser.add_argument(
|
|
248
246
|
"--diff-output", type=Path, help="Output directory for diff images"
|
|
249
247
|
)
|
|
@@ -18,7 +18,6 @@ import watchdog.events
|
|
|
18
18
|
from htmlcmp.compare_output import comparable_file, compare_files
|
|
19
19
|
from htmlcmp.html_render_diff import get_browser, html_render_diff
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
logger = logging.getLogger(__name__)
|
|
23
22
|
|
|
24
23
|
|
|
@@ -699,7 +698,7 @@ def main():
|
|
|
699
698
|
parser = argparse.ArgumentParser()
|
|
700
699
|
parser.add_argument("ref", type=Path, help="Path to the reference directory")
|
|
701
700
|
parser.add_argument("mon", type=Path, help="Path to the monitored directory")
|
|
702
|
-
parser.add_argument("--driver", choices=["chrome", "firefox"
|
|
701
|
+
parser.add_argument("--driver", choices=["chrome", "firefox"])
|
|
703
702
|
parser.add_argument("--max-workers", type=int, default=1)
|
|
704
703
|
parser.add_argument("--compare", action="store_true")
|
|
705
704
|
parser.add_argument("--port", type=int, default=5000)
|
|
@@ -70,11 +70,7 @@ def get_browser(
|
|
|
70
70
|
f"Expected int for max_width and max_height, got {type(max_width)} and {type(max_height)}"
|
|
71
71
|
)
|
|
72
72
|
|
|
73
|
-
if driver == "
|
|
74
|
-
if shutil.which("phantomjs") is None:
|
|
75
|
-
raise EnvironmentError("PhantomJS is not installed or not found in PATH")
|
|
76
|
-
browser = webdriver.PhantomJS()
|
|
77
|
-
elif driver == "firefox":
|
|
73
|
+
if driver == "firefox":
|
|
78
74
|
options = webdriver.FirefoxOptions()
|
|
79
75
|
options.add_argument("--headless")
|
|
80
76
|
browser = webdriver.Firefox(options=options)
|
|
@@ -109,9 +105,7 @@ def main():
|
|
|
109
105
|
parser = argparse.ArgumentParser()
|
|
110
106
|
parser.add_argument("a", type=Path, help="Path to the first HTML file")
|
|
111
107
|
parser.add_argument("b", type=Path, help="Path to the second HTML file")
|
|
112
|
-
parser.add_argument(
|
|
113
|
-
"--driver", choices=["chrome", "firefox", "phantomjs"], default="firefox"
|
|
114
|
-
)
|
|
108
|
+
parser.add_argument("--driver", choices=["chrome", "firefox"], default="firefox")
|
|
115
109
|
parser.add_argument("--max-width", default=1000)
|
|
116
110
|
parser.add_argument("--max-height", default=10000)
|
|
117
111
|
args = parser.parse_args()
|
|
@@ -31,12 +31,6 @@ def test_get_browser():
|
|
|
31
31
|
assert browser.name == "firefox"
|
|
32
32
|
browser.quit()
|
|
33
33
|
|
|
34
|
-
# Test with PhantomJS
|
|
35
|
-
if shutil.which("phantomjs") is not None:
|
|
36
|
-
browser = get_browser("phantomjs")
|
|
37
|
-
assert browser.name == "phantomjs"
|
|
38
|
-
browser.quit()
|
|
39
|
-
|
|
40
34
|
|
|
41
35
|
def test_html_render_diff():
|
|
42
36
|
test1 = Path(__file__).parent / "test1.html"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|