From 852edbe92bf4ca151567887903fd5524624b19e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Tue, 10 Mar 2026 10:50:17 +0000 Subject: [PATCH] Add tests for client.propget() with URLs and absolute paths Verify that propget works correctly with file:// URLs and absolute filesystem paths, not just relative paths. Closes #35. --- subvertpy/tests/test_client.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/subvertpy/tests/test_client.py b/subvertpy/tests/test_client.py index 4e685596..930bae3f 100644 --- a/subvertpy/tests/test_client.py +++ b/subvertpy/tests/test_client.py @@ -320,6 +320,29 @@ def test_propset_propget(self): self.assertIsInstance(ret, dict) self.assertIn(b"myval", ret.values()) + def test_propget_url(self): + self.build_tree({"dc/foo": b"bla"}) + self.client.add("dc/foo") + self.client.log_msg_func = lambda c: "Commit" + self.client.commit(["dc"]) + self.client.propset("myprop", "myval", "dc/foo", False, True) + self.client.commit(["dc"]) + url = self.repos_url + "/foo" + ret = self.client.propget("myprop", url, 2, 2) + self.assertIsInstance(ret, dict) + self.assertIn(b"myval", ret.values()) + + def test_propget_abspath(self): + self.build_tree({"dc/foo": b"bla"}) + self.client.add("dc/foo") + self.client.log_msg_func = lambda c: "Commit" + self.client.commit(["dc"]) + self.client.propset("myprop", "myval", "dc/foo", False, True) + abspath = os.path.abspath("dc/foo") + ret = self.client.propget("myprop", abspath, "WORKING", "WORKING") + self.assertIsInstance(ret, dict) + self.assertIn(b"myval", ret.values()) + def test_proplist(self): self.build_tree({"dc/foo": b"bla"}) self.client.add("dc/foo")