From 4d954a7632a00da4aaf17051aebdbe9c6ac892af Mon Sep 17 00:00:00 2001 From: jrycw Date: Sat, 23 Nov 2024 23:54:14 +0800 Subject: [PATCH] Update `test_utils.py` --- tests/test_utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_utils.py b/tests/test_utils.py index fba2a657b..d3838606d 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,6 +1,8 @@ from collections.abc import Generator +from pathlib import Path import pytest + from great_tables import GT, exibble from great_tables._tbl_data import is_na from great_tables._utils import ( @@ -14,6 +16,7 @@ _migrate_unformatted_to_output, OrderedSet, _str_scalar_to_list, + is_valid_http_schema, heading_has_subtitle, heading_has_title, seq_groups, @@ -215,3 +218,10 @@ def test_migrate_unformatted_to_output_html(): ) assert is_na(migrated._body.body, migrated._body.body["char"].tolist()).tolist() == [True, True] + + +@pytest.mark.parametrize( + "url", ["http://posit.co/", "http://posit.co", "https://posit.co/", "https://posit.co"] +) +def test_is_valid_http_schema(url: str): + assert is_valid_http_schema(url)