Changeset 641


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.

Files:
6 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
  • trunk/module/tests/test_classic_connection.py

    r640 r641  
    8080
    8181class TestConnectObject(unittest.TestCase):
    82     """"Test existence of basic pg connection methods."""
     82    """Test existence of basic pg connection methods."""
    8383
    8484    def setUp(self):
     
    261261
    262262class TestSimpleQueries(unittest.TestCase):
    263     """"Test simple queries via a basic pg connection."""
     263    """Test simple queries via a basic pg connection."""
    264264
    265265    def setUp(self):
     
    543543
    544544class TestUnicodeQueries(unittest.TestCase):
    545     """"Test unicode strings as queries via a basic pg connection."""
     545    """Test unicode strings as queries via a basic pg connection."""
    546546
    547547    def setUp(self):
     
    704704
    705705class TestParamQueries(unittest.TestCase):
    706     """"Test queries with parameters via a basic pg connection."""
     706    """Test queries with parameters via a basic pg connection."""
    707707
    708708    def setUp(self):
     
    866866
    867867class TestInserttable(unittest.TestCase):
    868     """"Test inserttable method."""
     868    """Test inserttable method."""
    869869
    870870    @classmethod
     
    10971097
    10981098class TestDirectSocketAccess(unittest.TestCase):
    1099     """"Test copy command with direct socket access."""
     1099    """Test copy command with direct socket access."""
    11001100
    11011101    @classmethod
     
    11971197
    11981198class TestNotificatons(unittest.TestCase):
    1199     """"Test notification support."""
     1199    """Test notification support."""
    12001200
    12011201    def setUp(self):
     
    16011601
    16021602class TestStandaloneEscapeFunctions(unittest.TestCase):
    1603     """"Test pg escape functions.
     1603    """Test pg escape functions.
    16041604
    16051605    The libpq interface memorizes some parameters of the last opened
  • trunk/module/tests/test_classic_dbwrapper.py

    r640 r641  
    6464
    6565class TestDBClassBasic(unittest.TestCase):
    66     """"Test existence of the DB class wrapped pg connection methods."""
     66    """Test existence of the DB class wrapped pg connection methods."""
    6767
    6868    def setUp(self):
     
    279279
    280280class TestDBClass(unittest.TestCase):
    281     """"Test the methods of the DB class wrapped pg connection."""
     281    """Test the methods of the DB class wrapped pg connection."""
    282282
    283283    @classmethod
     
    10991099
    11001100class TestSchemas(unittest.TestCase):
    1101     """"Test correct handling of schemas (namespaces)."""
     1101    """Test correct handling of schemas (namespaces)."""
    11021102
    11031103    @classmethod
  • trunk/module/tests/test_classic_functions.py

    r640 r641  
    266266
    267267class TestEscapeFunctions(unittest.TestCase):
    268     """"Test pg escape and unescape functions.
     268    """Test pg escape and unescape functions.
    269269
    270270    The libpq interface memorizes some parameters of the last opened
Note: See TracChangeset for help on using the changeset viewer.