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 0c8c7fb commit 63a9494Copy full SHA for 63a9494
Lib/test/test_sqlite3/test_dbapi.py
@@ -660,6 +660,14 @@ def test_deserialize_corrupt_database(self):
660
class OpenTests(unittest.TestCase):
661
_sql = "create table test(id integer)"
662
663
+ def test_open_with_bytes_path(self):
664
+ path = os.fsencode(TESTFN)
665
+ self.addCleanup(unlink, path)
666
+ self.assertFalse(os.path.exists(path))
667
+ with contextlib.closing(sqlite.connect(path)) as cx:
668
+ self.assertTrue(os.path.exists(path))
669
+ cx.execute(self._sql)
670
+
671
def test_open_with_path_like_object(self):
672
""" Checks that we can successfully connect to a database using an object that
673
is PathLike, i.e. has __fspath__(). """
0 commit comments