Changeset 641 for branches/4.x


Ignore:
Timestamp:
Nov 26, 2015, 5:43:29 PM (4 years ago)
Author:
cito
Message:

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.

Location:
branches/4.x/module/tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.x/module/tests/test_classic_connection.py

    r640 r641  
    6363
    6464class TestConnectObject(unittest.TestCase):
    65     """"Test existence of basic pg connection methods."""
     65    """Test existence of basic pg connection methods."""
    6666
    6767    def setUp(self):
     
    223223
    224224class TestSimpleQueries(unittest.TestCase):
    225     """"Test simple queries via a basic pg connection."""
     225    """Test simple queries via a basic pg connection."""
    226226
    227227    def setUp(self):
     
    506506
    507507class TestParamQueries(unittest.TestCase):
    508     """"Test queries with parameters via a basic pg connection."""
     508    """Test queries with parameters via a basic pg connection."""
    509509
    510510    def setUp(self):
     
    644644
    645645class TestInserttable(unittest.TestCase):
    646     """"Test inserttable method."""
     646    """Test inserttable method."""
    647647
    648648    @classmethod
     
    769769
    770770class TestDirectSocketAccess(unittest.TestCase):
    771     """"Test copy command with direct socket access."""
     771    """Test copy command with direct socket access."""
    772772
    773773    @classmethod
     
    835835
    836836class TestNotificatons(unittest.TestCase):
    837     """"Test notification support."""
     837    """Test notification support."""
    838838
    839839    def setUp(self):
  • branches/4.x/module/tests/test_classic_dbwrapper.py

    r640 r641  
    4848
    4949class TestDBClassBasic(unittest.TestCase):
    50     """"Test existence of the DB class wrapped pg connection methods."""
     50    """Test existence of the DB class wrapped pg connection methods."""
    5151
    5252    def setUp(self):
     
    262262
    263263class TestDBClass(unittest.TestCase):
    264     """"Test the methods of the DB class wrapped pg connection."""
     264    """Test the methods of the DB class wrapped pg connection."""
    265265
    266266    @classmethod
     
    10241024
    10251025class TestSchemas(unittest.TestCase):
    1026     """"Test correct handling of schemas (namespaces)."""
     1026    """Test correct handling of schemas (namespaces)."""
    10271027
    10281028    @classmethod
  • branches/4.x/module/tests/test_classic_functions.py

    r640 r641  
    256256
    257257class TestEscapeFunctions(unittest.TestCase):
    258     """"Test pg escape and unescape functions."""
     258    """Test pg escape and unescape functions.
     259
     260    The libpq interface memorizes some parameters of the last opened
     261    connection that influence the result of these functions.
     262    Therefore we cannot do rigid tests of these functions here.
     263    We leave this for the test module that runs with a database.
     264
     265    """
    259266
    260267    def testEscapeString(self):
    261268        f = pg.escape_string
    262269        self.assertEqual(f('plain'), 'plain')
    263         self.assertEqual(f("that's k\xe4se"), "that''s k\xe4se")
    264         self.assertEqual(f(r"It's fine to have a \ inside."),
    265             r"It''s fine to have a \\ inside.")
     270        self.assertEqual(f("that's cheese"), "that''s cheese")
    266271
    267272    def testEscapeBytea(self):
    268273        f = pg.escape_bytea
    269274        self.assertEqual(f('plain'), 'plain')
    270         self.assertEqual(f("that's k\xe4se"), "that''s k\\\\344se")
    271         self.assertEqual(f('O\x00ps\xff!'), r'O\\000ps\\377!')
     275        self.assertEqual(f("that's cheese"), "that''s cheese")
    272276
    273277    def testUnescapeBytea(self):
    274278        f = pg.unescape_bytea
    275279        self.assertEqual(f('plain'), 'plain')
    276         self.assertEqual(f("that's k\\344se"), "that's k\xe4se")
     280        self.assertEqual(f("das is' k\\303\\244se"), "das is' kÀse")
    277281        self.assertEqual(f(r'O\000ps\377!'), 'O\x00ps\xff!')
    278282
Note: See TracChangeset for help on using the changeset viewer.