We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1953713 commit e762405Copy full SHA for e762405
Lib/test/test_sqlite3/test_dbapi.py
@@ -631,6 +631,14 @@ def test_deserialize_corrupt_database(self):
631
class OpenTests(unittest.TestCase):
632
_sql = "create table test(id integer)"
633
634
+ def test_open_with_bytes_path(self):
635
+ path = os.fsencode(TESTFN)
636
+ self.addCleanup(unlink, path)
637
+ self.assertFalse(os.path.exists(path))
638
+ with contextlib.closing(sqlite.connect(path)) as cx:
639
+ self.assertTrue(os.path.exists(path))
640
+ cx.execute(self._sql)
641
+
642
def test_open_with_path_like_object(self):
643
""" Checks that we can successfully connect to a database using an object that
644
is PathLike, i.e. has __fspath__(). """
0 commit comments