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 181cecc commit 827c90bCopy full SHA for 827c90b
Lib/test/test_sqlite3/test_dbapi.py
@@ -639,6 +639,14 @@ def test_deserialize_corrupt_database(self):
639
class OpenTests(unittest.TestCase):
640
_sql = "create table test(id integer)"
641
642
+ def test_open_with_bytes_path(self):
643
+ path = os.fsencode(TESTFN)
644
+ self.addCleanup(unlink, path)
645
+ self.assertFalse(os.path.exists(path))
646
+ with contextlib.closing(sqlite.connect(path)) as cx:
647
+ self.assertTrue(os.path.exists(path))
648
+ cx.execute(self._sql)
649
+
650
def test_open_with_path_like_object(self):
651
""" Checks that we can successfully connect to a database using an object that
652
is PathLike, i.e. has __fspath__(). """
0 commit comments