Skip to content

Commit

Permalink
Add test for scheme parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann committed Nov 12, 2023
1 parent 637ee56 commit 2769e44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")

0 comments on commit 2769e44

Please sign in to comment.