Author: cito
Date: Thu Nov 26 17:43:29 2015
New Revision: 641
Log:
Remove surplus quote marks in docstrings
Also, backport reduction of some tests to the 4x. branch.
These tests are dependent on the current state of the last
opened database connection, so they cannot be tested without
opening a database connection and resetting the state.
Modified:
branches/4.x/module/tests/test_classic_connection.py
branches/4.x/module/tests/test_classic_dbwrapper.py
branches/4.x/module/tests/test_classic_functions.py
trunk/module/tests/test_classic_connection.py
trunk/module/tests/test_classic_dbwrapper.py
trunk/module/tests/test_classic_functions.py
Modified: branches/4.x/module/tests/test_classic_connection.py
==============================================================================
--- branches/4.x/module/tests/test_classic_connection.py Thu Nov 26
17:27:55 2015 (r640)
+++ branches/4.x/module/tests/test_classic_connection.py Thu Nov 26
17:43:29 2015 (r641)
@@ -62,7 +62,7 @@
class TestConnectObject(unittest.TestCase):
- """"Test existence of basic pg connection methods."""
+ """Test existence of basic pg connection methods."""
def setUp(self):
self.connection = connect()
@@ -222,7 +222,7 @@
class TestSimpleQueries(unittest.TestCase):
- """"Test simple queries via a basic pg connection."""
+ """Test simple queries via a basic pg connection."""
def setUp(self):
self.c = connect()
@@ -505,7 +505,7 @@
class TestParamQueries(unittest.TestCase):
- """"Test queries with parameters via a basic pg connection."""
+ """Test queries with parameters via a basic pg connection."""
def setUp(self):
self.c = connect()
@@ -643,7 +643,7 @@
class TestInserttable(unittest.TestCase):
- """"Test inserttable method."""
+ """Test inserttable method."""
@classmethod
def setUpClass(cls):
@@ -768,7 +768,7 @@
class TestDirectSocketAccess(unittest.TestCase):
- """"Test copy command with direct socket access."""
+ """Test copy command with direct socket access."""
@classmethod
def setUpClass(cls):
@@ -834,7 +834,7 @@
class TestNotificatons(unittest.TestCase):
- """"Test notification support."""
+ """Test notification support."""
def setUp(self):
self.c = connect()
Modified: branches/4.x/module/tests/test_classic_dbwrapper.py
==============================================================================
--- branches/4.x/module/tests/test_classic_dbwrapper.py Thu Nov 26 17:27:55
2015 (r640)
+++ branches/4.x/module/tests/test_classic_dbwrapper.py Thu Nov 26 17:43:29
2015 (r641)
@@ -47,7 +47,7 @@
class TestDBClassBasic(unittest.TestCase):
- """"Test existence of the DB class wrapped pg connection methods."""
+ """Test existence of the DB class wrapped pg connection methods."""
def setUp(self):
self.db = DB()
@@ -261,7 +261,7 @@
class TestDBClass(unittest.TestCase):
- """"Test the methods of the DB class wrapped pg connection."""
+ """Test the methods of the DB class wrapped pg connection."""
@classmethod
def setUpClass(cls):
@@ -1023,7 +1023,7 @@
class TestSchemas(unittest.TestCase):
- """"Test correct handling of schemas (namespaces)."""
+ """Test correct handling of schemas (namespaces)."""
@classmethod
def setUpClass(cls):
Modified: branches/4.x/module/tests/test_classic_functions.py
==============================================================================
--- branches/4.x/module/tests/test_classic_functions.py Thu Nov 26 17:27:55
2015 (r640)
+++ branches/4.x/module/tests/test_classic_functions.py Thu Nov 26 17:43:29
2015 (r641)
@@ -255,25 +255,29 @@
class TestEscapeFunctions(unittest.TestCase):
- """"Test pg escape and unescape functions."""
+ """Test pg escape and unescape functions.
+
+ The libpq interface memorizes some parameters of the last opened
+ connection that influence the result of these functions.
+ Therefore we cannot do rigid tests of these functions here.
+ We leave this for the test module that runs with a database.
+
+ """
def testEscapeString(self):
f = pg.escape_string
self.assertEqual(f('plain'), 'plain')
- self.assertEqual(f("that's k\xe4se"), "that''s k\xe4se")
- self.assertEqual(f(r"It's fine to have a \ inside."),
- r"It''s fine to have a \\ inside.")
+ self.assertEqual(f("that's cheese"), "that''s cheese")
def testEscapeBytea(self):
f = pg.escape_bytea
self.assertEqual(f('plain'), 'plain')
- self.assertEqual(f("that's k\xe4se"), "that''s k\\\\344se")
- self.assertEqual(f('O\x00ps\xff!'), r'O\\000ps\\377!')
+ self.assertEqual(f("that's cheese"), "that''s cheese")
def testUnescapeBytea(self):
f = pg.unescape_bytea
self.assertEqual(f('plain'), 'plain')
- self.assertEqual(f("that's k\\344se"), "that's k\xe4se")
+ self.assertEqual(f("das is' k\\303\\244se"), "das is' käse")
self.assertEqual(f(r'O\000ps\377!'), 'O\x00ps\xff!')
Modified: trunk/module/tests/test_classic_connection.py
==============================================================================
--- trunk/module/tests/test_classic_connection.py Thu Nov 26 17:27:55
2015 (r640)
+++ trunk/module/tests/test_classic_connection.py Thu Nov 26 17:43:29
2015 (r641)
@@ -79,7 +79,7 @@
class TestConnectObject(unittest.TestCase):
- """"Test existence of basic pg connection methods."""
+ """Test existence of basic pg connection methods."""
def setUp(self):
self.connection = connect()
@@ -260,7 +260,7 @@
class TestSimpleQueries(unittest.TestCase):
- """"Test simple queries via a basic pg connection."""
+ """Test simple queries via a basic pg connection."""
def setUp(self):
self.c = connect()
@@ -542,7 +542,7 @@
class TestUnicodeQueries(unittest.TestCase):
- """"Test unicode strings as queries via a basic pg connection."""
+ """Test unicode strings as queries via a basic pg connection."""
def setUp(self):
self.c = connect()
@@ -703,7 +703,7 @@
class TestParamQueries(unittest.TestCase):
- """"Test queries with parameters via a basic pg connection."""
+ """Test queries with parameters via a basic pg connection."""
def setUp(self):
self.c = connect()
@@ -865,7 +865,7 @@
class TestInserttable(unittest.TestCase):
- """"Test inserttable method."""
+ """Test inserttable method."""
@classmethod
def setUpClass(cls):
@@ -1096,7 +1096,7 @@
class TestDirectSocketAccess(unittest.TestCase):
- """"Test copy command with direct socket access."""
+ """Test copy command with direct socket access."""
@classmethod
def setUpClass(cls):
@@ -1196,7 +1196,7 @@
class TestNotificatons(unittest.TestCase):
- """"Test notification support."""
+ """Test notification support."""
def setUp(self):
self.c = connect()
@@ -1600,7 +1600,7 @@
class TestStandaloneEscapeFunctions(unittest.TestCase):
- """"Test pg escape functions.
+ """Test pg escape functions.
The libpq interface memorizes some parameters of the last opened
connection that influence the result of these functions. Therefore
Modified: trunk/module/tests/test_classic_dbwrapper.py
==============================================================================
--- trunk/module/tests/test_classic_dbwrapper.py Thu Nov 26 17:27:55
2015 (r640)
+++ trunk/module/tests/test_classic_dbwrapper.py Thu Nov 26 17:43:29
2015 (r641)
@@ -63,7 +63,7 @@
class TestDBClassBasic(unittest.TestCase):
- """"Test existence of the DB class wrapped pg connection methods."""
+ """Test existence of the DB class wrapped pg connection methods."""
def setUp(self):
self.db = DB()
@@ -278,7 +278,7 @@
class TestDBClass(unittest.TestCase):
- """"Test the methods of the DB class wrapped pg connection."""
+ """Test the methods of the DB class wrapped pg connection."""
@classmethod
def setUpClass(cls):
@@ -1098,7 +1098,7 @@
class TestSchemas(unittest.TestCase):
- """"Test correct handling of schemas (namespaces)."""
+ """Test correct handling of schemas (namespaces)."""
@classmethod
def setUpClass(cls):
Modified: trunk/module/tests/test_classic_functions.py
==============================================================================
--- trunk/module/tests/test_classic_functions.py Thu Nov 26 17:27:55
2015 (r640)
+++ trunk/module/tests/test_classic_functions.py Thu Nov 26 17:43:29
2015 (r641)
@@ -265,7 +265,7 @@
class TestEscapeFunctions(unittest.TestCase):
- """"Test pg escape and unescape functions.
+ """Test pg escape and unescape functions.
The libpq interface memorizes some parameters of the last opened
connection that influence the result of these functions.
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql