From 99860587e42254d82745769b1a365e7847fe5d55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jelmer=20Vernoo=C4=B3?= Date: Thu, 24 May 2018 22:02:53 +0100 Subject: [PATCH] Create actual locks in tests, too. --- subvertpy/tests/test_wc.py | 5 +++-- subvertpy/wc.c | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/subvertpy/tests/test_wc.py b/subvertpy/tests/test_wc.py index 3a608a72..092fb951 100644 --- a/subvertpy/tests/test_wc.py +++ b/subvertpy/tests/test_wc.py @@ -426,10 +426,11 @@ class ContextTests(SubversionTestCase): f.write("modified") self.client_add("checkout/bla.txt") context = wc.Context() + lock = wc.Lock() self.assertEqual((False, False), context.locked("checkout")) - context.add_lock("checkout", ()) + context.add_lock("checkout", lock) self.assertEqual((True, True), context.locked("checkout")) - context.remove_lock("checkout") + context.remove_lock("checkout", lock) def test_add_from_disk(self): self.make_client("repos", "checkout") diff --git a/subvertpy/wc.c b/subvertpy/wc.c index da6511d0..16dd0170 100644 --- a/subvertpy/wc.c +++ b/subvertpy/wc.c @@ -2125,6 +2125,9 @@ moduleinit(void) PyModule_AddObject(mod, "Adm", (PyObject *)&Adm_Type); Py_INCREF(&Adm_Type); + PyModule_AddObject(mod, "Lock", (PyObject *)&Lock_Type); + Py_INCREF(&Lock_Type); + PyModule_AddObject(mod, "CommittedQueue", (PyObject *)&CommittedQueue_Type); Py_INCREF(&CommittedQueue_Type); -- 2.34.1