Create actual locks in tests, too.
authorJelmer Vernooij <jelmer@jelmer.uk>
Thu, 24 May 2018 21:02:53 +0000 (22:02 +0100)
committerJelmer Vernooij <jelmer@jelmer.uk>
Thu, 24 May 2018 21:02:53 +0000 (22:02 +0100)
subvertpy/tests/test_wc.py
subvertpy/wc.c

index 3a608a7256a939962a674ab8addfdc1e0b15132f..092fb951389897b6265657ad453b814d60cee289 100644 (file)
@@ -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")
index da6511d00706fded8b8737b49b6c7d7e510bf246..16dd0170142707ee72d01f9b0b5e9269f982920d 100644 (file)
@@ -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);