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 b36d23f commit 1bde13bCopy full SHA for 1bde13b
Lib/test/test_sqlite3/test_dbapi.py
@@ -630,6 +630,14 @@ def test_deserialize_corrupt_database(self):
630
class OpenTests(unittest.TestCase):
631
_sql = "create table test(id integer)"
632
633
+ def test_open_with_bytes_path(self):
634
+ path = os.fsencode(TESTFN)
635
+ self.addCleanup(unlink, path)
636
+ self.assertFalse(os.path.exists(path))
637
+ with contextlib.closing(sqlite.connect(path)) as cx:
638
+ self.assertTrue(os.path.exists(path))
639
+ cx.execute(self._sql)
640
+
641
def test_open_with_path_like_object(self):
642
""" Checks that we can successfully connect to a database using an object that
643
is PathLike, i.e. has __fspath__(). """
0 commit comments