Changeset: 5a856270415a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5a856270415a
Removed Files:
        clients/python2/test/control.py
        clients/python3/test/control.py
Branch: default
Log Message:

remove duplicate tests


diffs (248 lines):

diff --git a/clients/python2/test/control.py b/clients/python2/test/control.py
deleted file mode 100644
--- a/clients/python2/test/control.py
+++ /dev/null
@@ -1,119 +0,0 @@
-import unittest
-from monetdb.control import Control
-from monetdb.exceptions import OperationalError
-#import logging
-#logging.basicConfig(level=logging.DEBUG)
-
-database_prefix = 'controltest_'
-database_name = database_prefix + 'other'
-passphrase = 'testdb'
-
-def do_without_fail(function):
-    try:
-        function()
-    except OperationalError:
-        pass
-
-class TestManage(unittest.TestCase):
-    def setUp(self):
-        self.control = Control('localhost', 50000, passphrase)
-        do_without_fail(lambda: self.control.stop(database_name))
-        do_without_fail(lambda: self.control.destroy(database_name))
-        self.control.create(database_name)
-
-    def tearDown(self):
-        do_without_fail(lambda: self.control.stop(database_name))
-        do_without_fail(lambda: self.control.destroy(database_name))
-
-    def testCreate(self):
-        create_name = database_prefix + "create"
-        do_without_fail(lambda: self.control.destroy(create_name))
-        self.control.create(create_name)
-        self.assertRaises(OperationalError, self.control.create, create_name)
-        do_without_fail(lambda: self.control.destroy(create_name))
-
-    def testDestroy(self):
-        destroy_name = database_prefix + "destroy"
-        self.control.create(destroy_name)
-        self.control.destroy(destroy_name)
-        self.assertRaises(OperationalError, self.control.destroy, destroy_name)
-
-    def testLock(self):
-        do_without_fail(lambda: self.control.release(database_name))
-        self.control.lock(database_name)
-        self.assertRaises(OperationalError, self.control.lock, database_name)
-
-    def testRelease(self):
-        do_without_fail(lambda: self.control.release(database_name))
-        do_without_fail(lambda: self.control.lock(database_name))
-        self.assertTrue(self.control.release(database_name))
-        self.assertRaises(OperationalError, self.control.release, 
database_name)
-
-    def testStatus(self):
-        status1 = database_prefix + "status1"
-        do_without_fail(lambda: self.control.destroy(status1))
-        self.control.create(status1)
-        status = self.control.status(status1)
-        self.assertEquals(status["name"], status1)
-
-    def testStatuses(self):
-        status1 = database_prefix + "status1"
-        status2 = database_prefix + "status2"
-        do_without_fail(lambda: self.control.destroy(status1))
-        do_without_fail(lambda: self.control.destroy(status2))
-        self.control.create(status1)
-        self.control.create(status2)
-        statuses = self.control.status()
-        self.assertTrue(status1 in [status["name"] for status in statuses])
-        self.assertTrue(status2 in [status["name"] for status in statuses])
-        do_without_fail(lambda: self.control.destroy(status1))
-        do_without_fail(lambda: self.control.destroy(status2))
-
-    def testStart(self):
-        do_without_fail(lambda: self.control.stop(database_name))
-        self.assertTrue(self.control.start(database_name))
-
-    def testStop(self):
-        do_without_fail(lambda: self.control.start(database_name))
-        self.assertTrue(self.control.stop(database_name))
-
-    def testKill(self):
-        do_without_fail(lambda: self.control.start(database_name))
-        self.assertTrue(self.control.kill(database_name))
-
-    def testSet(self):
-        property_ = "readonly"
-        value = "yes"
-        self.control.set(database_name, property_, value)
-        properties = self.control.get(database_name)
-        self.assertEqual(properties[property_], value)
-
-    def testGet(self):
-        properties = self.control.get(database_name)
-
-    def testInherit(self):
-        self.control.set(database_name, "readonly", "yes")
-        self.assertTrue(self.control.inherit(database_name, "readonly"))
-        self.assertFalse(self.control.get(database_name).has_key("readonly"))
-
-    def testRename(self):
-        old = database_prefix + "old"
-        new = database_prefix + "new"
-        do_without_fail(lambda: self.control.destroy(old))
-        do_without_fail(lambda: self.control.destroy(new))
-        self.control.create(old)
-        self.control.rename(old, new)
-        statuses = self.control.status()
-        self.assertTrue(new in [status["name"] for status in statuses])
-        do_without_fail(lambda: self.control.destroy(new))
-
-    def testDefaults(self):
-        defaults = self.control.defaults()
-        self.assertTrue(defaults.has_key("readonly"))
-
-    def testNeighbours(self):
-        neighbours = self.control.neighbours()
-        neighbours
-
-if __name__ == '__main__':
-    unittest.main()
diff --git a/clients/python3/test/control.py b/clients/python3/test/control.py
deleted file mode 100644
--- a/clients/python3/test/control.py
+++ /dev/null
@@ -1,119 +0,0 @@
-import unittest
-from monetdb.control import Control
-from monetdb.exceptions import OperationalError
-#import logging
-#logging.basicConfig(level=logging.DEBUG)
-
-database_prefix = 'controltest_'
-database_name = database_prefix + 'other'
-passphrase = 'testdb'
-
-def do_without_fail(function):
-    try:
-        function()
-    except OperationalError:
-        pass
-
-class TestManage(unittest.TestCase):
-    def setUp(self):
-        self.control = Control('localhost', 50000, passphrase)
-        do_without_fail(lambda: self.control.stop(database_name))
-        do_without_fail(lambda: self.control.destroy(database_name))
-        self.control.create(database_name)
-
-    def tearDown(self):
-        do_without_fail(lambda: self.control.stop(database_name))
-        do_without_fail(lambda: self.control.destroy(database_name))
-
-    def testCreate(self):
-        create_name = database_prefix + "create"
-        do_without_fail(lambda: self.control.destroy(create_name))
-        self.control.create(create_name)
-        self.assertRaises(OperationalError, self.control.create, create_name)
-        do_without_fail(lambda: self.control.destroy(create_name))
-
-    def testDestroy(self):
-        destroy_name = database_prefix + "destroy"
-        self.control.create(destroy_name)
-        self.control.destroy(destroy_name)
-        self.assertRaises(OperationalError, self.control.destroy, destroy_name)
-
-    def testLock(self):
-        do_without_fail(lambda: self.control.release(database_name))
-        self.control.lock(database_name)
-        self.assertRaises(OperationalError, self.control.lock, database_name)
-
-    def testRelease(self):
-        do_without_fail(lambda: self.control.release(database_name))
-        do_without_fail(lambda: self.control.lock(database_name))
-        self.assertTrue(self.control.release(database_name))
-        self.assertRaises(OperationalError, self.control.release, 
database_name)
-
-    def testStatus(self):
-        status1 = database_prefix + "status1"
-        do_without_fail(lambda: self.control.destroy(status1))
-        self.control.create(status1)
-        status = self.control.status(status1)
-        self.assertEquals(status["name"], status1)
-
-    def testStatuses(self):
-        status1 = database_prefix + "status1"
-        status2 = database_prefix + "status2"
-        do_without_fail(lambda: self.control.destroy(status1))
-        do_without_fail(lambda: self.control.destroy(status2))
-        self.control.create(status1)
-        self.control.create(status2)
-        statuses = self.control.status()
-        self.assertTrue(status1 in [status["name"] for status in statuses])
-        self.assertTrue(status2 in [status["name"] for status in statuses])
-        do_without_fail(lambda: self.control.destroy(status1))
-        do_without_fail(lambda: self.control.destroy(status2))
-
-    def testStart(self):
-        do_without_fail(lambda: self.control.stop(database_name))
-        self.assertTrue(self.control.start(database_name))
-
-    def testStop(self):
-        do_without_fail(lambda: self.control.start(database_name))
-        self.assertTrue(self.control.stop(database_name))
-
-    def testKill(self):
-        do_without_fail(lambda: self.control.start(database_name))
-        self.assertTrue(self.control.kill(database_name))
-
-    def testSet(self):
-        property_ = "readonly"
-        value = "yes"
-        self.control.set(database_name, property_, value)
-        properties = self.control.get(database_name)
-        self.assertEqual(properties[property_], value)
-
-    def testGet(self):
-        properties = self.control.get(database_name)
-
-    def testInherit(self):
-        self.control.set(database_name, "readonly", "yes")
-        self.assertTrue(self.control.inherit(database_name, "readonly"))
-        self.assertFalse(self.control.get(database_name).has_key("readonly"))
-
-    def testRename(self):
-        old = database_prefix + "old"
-        new = database_prefix + "new"
-        do_without_fail(lambda: self.control.destroy(old))
-        do_without_fail(lambda: self.control.destroy(new))
-        self.control.create(old)
-        self.control.rename(old, new)
-        statuses = self.control.status()
-        self.assertTrue(new in [status["name"] for status in statuses])
-        do_without_fail(lambda: self.control.destroy(new))
-
-    def testDefaults(self):
-        defaults = self.control.defaults()
-        self.assertTrue(defaults.has_key("readonly"))
-
-    def testNeighbours(self):
-        neighbours = self.control.neighbours()
-        neighbours
-
-if __name__ == '__main__':
-    unittest.main()
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to