diff --git a/tests/test_end_to_end.py b/tests/test_end_to_end.py index 8ff2f86..c04d539 100644 --- a/tests/test_end_to_end.py +++ b/tests/test_end_to_end.py @@ -79,522 +79,7 @@ def _normalize_html(html: str) -> str: return html -snapshots = snapshot( - { - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("da69cf4e2834*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("c7fb0a797254*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("d552c9951139*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("011c334b854b*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("a1b8ff405bf2*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("1531e41e8dbe*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("011c334b854b*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("bd14e6a60af2*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("bd14e6a60af2*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("d552c9951139*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("011c334b854b*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("89c8c205249f*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("bd14e6a60af2*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("c7fb0a797254*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("d552c9951139*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("a1b8ff405bf2*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("1531e41e8dbe*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("c7fb0a797254*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("d944bd9f3d8c*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("011c334b854b*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("bd14e6a60af2*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("011c334b854b*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("d944bd9f3d8c*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("bd14e6a60af2*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("89c8c205249f*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("89c8c205249f*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("bd14e6a60af2*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("3603a08e7614*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("011c334b854b*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("3603a08e7614*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("011c334b854b*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("011c334b854b*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("1531e41e8dbe*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("d552c9951139*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("da69cf4e2834*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("89c8c205249f*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", False), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("a1b8ff405bf2*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("bd14e6a60af2*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("3603a08e7614*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("3603a08e7614*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("bd14e6a60af2*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("d944bd9f3d8c*.html"), - ( - ("annotations_path", "source"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("1531e41e8dbe*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", False), - ("unwrap_annotated", True), - ): external("36a1a03a6364*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("d944bd9f3d8c*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", True), - ("signature_crossrefs", False), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("a1b8ff405bf2*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", True), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", True), - ): external("c7fb0a797254*.html"), - ( - ("annotations_path", "source"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("da69cf4e2834*.html"), - ( - ("annotations_path", "brief"), - ("show_signature", False), - ("show_signature_annotations", False), - ("signature_crossrefs", True), - ("separate_signature", True), - ("unwrap_annotated", False), - ): external("da69cf4e2834*.html"), - }, -) +snapshots = snapshot() # General options. @@ -734,5 +219,5 @@ class Qux(Bar): data = handler.collect("pkg", handler_options) html = handler.render(data, handler_options) html = _normalize_html(html) - snapshot_key = tuple(final_options.items()) + snapshot_key = tuple(sorted(final_options.items())) assert outsource(html, suffix=".html") == snapshots[snapshot_key]