MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 3.146.65.73
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /opt/rh/rh-python35/root/lib/python3.5/site-packages/pymysql/tests/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //opt/rh/rh-python35/root/lib/python3.5/site-packages/pymysql/tests/test_converters.py
from unittest import TestCase

from pymysql._compat import PY2
from pymysql import converters


__all__ = ["TestConverter"]


class TestConverter(TestCase):

    def test_escape_string(self):
        self.assertEqual(
            converters.escape_string(u"foo\nbar"),
            u"foo\\nbar"
        )

    if PY2:
        def test_escape_string_bytes(self):
            self.assertEqual(
                converters.escape_string(b"foo\nbar"),
                b"foo\\nbar"
            )

MMCT - 2023