From 2769e442bb54aa1ad1ec925eb83c12c35136384f Mon Sep 17 00:00:00 2001 From: Janos Wortmann Date: Sun, 12 Nov 2023 16:11:09 +0100 Subject: [PATCH] Add test for scheme parsing --- tests/test_url.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_url.py b/tests/test_url.py index 41e2fc9c5..9d782418a 100644 --- a/tests/test_url.py +++ b/tests/test_url.py @@ -71,3 +71,9 @@ def test_buffer_uri(self): view.buffer_id = unittest.mock.MagicMock(return_value=42) uri = view_to_uri(view) self.assertEqual(uri, "buffer:42") + + def test_parse_uri(self): + scheme, _ = parse_uri("buffer:42") + self.assertEqual(scheme, "buffer") + scheme, _ = parse_uri("www.example.com/foo:bar") + self.assertEqual(scheme, "")