Python pymysql.constants() Examples

The following are 8 code examples of pymysql.constants(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pymysql , or try the search function .
Example #1
Source File: test_MySQLdb_capabilities.py    From ServerlessCrawler-VancouverRealState with MIT License 5 votes vote down vote up
def test_bug_2671682(self):
        from pymysql.constants import ER
        try:
            self.cursor.execute("describe some_non_existent_table");
        except self.connection.ProgrammingError as msg:
            self.assertEqual(msg.args[0], ER.NO_SUCH_TABLE) 
Example #2
Source File: test_sql.py    From vnpy_crypto with MIT License 5 votes vote down vote up
def setup_driver(cls):
        try:
            import pymysql  # noqa
            cls.driver = 'pymysql'
            from pymysql.constants import CLIENT
            cls.connect_args = {'client_flag': CLIENT.MULTI_STATEMENTS}
        except ImportError:
            pytest.skip('pymysql not installed') 
Example #3
Source File: test_MySQLdb_capabilities.py    From VaspCZ with MIT License 5 votes vote down vote up
def test_bug_2671682(self):
        from pymysql.constants import ER
        try:
            self.cursor.execute("describe some_non_existent_table");
        except self.connection.ProgrammingError as msg:
            self.assertEqual(msg.args[0], ER.NO_SUCH_TABLE) 
Example #4
Source File: test_MySQLdb_capabilities.py    From satori with Apache License 2.0 5 votes vote down vote up
def test_bug_2671682(self):
        from pymysql.constants import ER
        try:
            self.cursor.execute("describe some_non_existent_table");
        except self.connection.ProgrammingError as msg:
            self.assertEqual(msg.args[0], ER.NO_SUCH_TABLE) 
Example #5
Source File: test_MySQLdb_capabilities.py    From aws-servicebroker with Apache License 2.0 5 votes vote down vote up
def test_bug_2671682(self):
        from pymysql.constants import ER
        try:
            self.cursor.execute("describe some_non_existent_table");
        except self.connection.ProgrammingError as msg:
            self.assertEqual(msg.args[0], ER.NO_SUCH_TABLE) 
Example #6
Source File: test_MySQLdb_capabilities.py    From scalyr-agent-2 with Apache License 2.0 5 votes vote down vote up
def test_bug_2671682(self):
        from pymysql.constants import ER
        try:
            self.cursor.execute("describe some_non_existent_table");
        except self.connection.ProgrammingError as msg:
            self.assertEqual(msg.args[0], ER.NO_SUCH_TABLE) 
Example #7
Source File: test_MySQLdb_capabilities.py    From planespotter with MIT License 5 votes vote down vote up
def test_bug_2671682(self):
        from pymysql.constants import ER
        try:
            self.cursor.execute("describe some_non_existent_table");
        except self.connection.ProgrammingError as msg:
            self.assertEqual(msg.args[0], ER.NO_SUCH_TABLE) 
Example #8
Source File: test_sql.py    From twitter-stock-recommendation with MIT License 5 votes vote down vote up
def setup_driver(cls):
        try:
            import pymysql  # noqa
            cls.driver = 'pymysql'
            from pymysql.constants import CLIENT
            cls.connect_args = {'client_flag': CLIENT.MULTI_STATEMENTS}
        except ImportError:
            pytest.skip('pymysql not installed')