Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/hash.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ See also the :c:member:`PyTypeObject.tp_hash` member and :ref:`numeric-hash`.

Hash function definition used by :c:func:`PyHash_GetFuncDef`.

.. c::member:: Py_hash_t (*const hash)(const void *, Py_ssize_t)
.. c:member:: Py_hash_t (*const hash)(const void *, Py_ssize_t)

Hash function.

Expand Down
8 changes: 8 additions & 0 deletions Lib/test/test_sqlite3/test_dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,14 @@ def test_deserialize_corrupt_database(self):
class OpenTests(unittest.TestCase):
_sql = "create table test(id integer)"

def test_open_with_bytes_path(self):
path = os.fsencode(TESTFN)
self.addCleanup(unlink, path)
self.assertFalse(os.path.exists(path))
with contextlib.closing(sqlite.connect(path)) as cx:
self.assertTrue(os.path.exists(path))
cx.execute(self._sql)

def test_open_with_path_like_object(self):
""" Checks that we can successfully connect to a database using an object that
is PathLike, i.e. has __fspath__(). """
Expand Down
Loading