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
1 change: 0 additions & 1 deletion Lib/test/test_sqlite3/test_dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,6 @@ def test_row_equality(self):

self.assertNotEqual(r1, r3)

@unittest.expectedFailure # TODO: RUSTPYTHON; Row with no description fails
def test_row_no_description(self):
cu = self.cx.cursor()
self.assertIsNone(cu.description)
Expand Down
4 changes: 2 additions & 2 deletions crates/stdlib/src/_sqlite3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,7 @@ mod _sqlite3 {
return self.data.getitem_by_index(vm, i);
}
}
Err(vm.new_index_error("No item with that key"))
Err(vm.new_index_error(format!("No item with key '{}'", name.to_string_lossy())))
} else if let Some(slice) = needle.downcast_ref::<PySlice>() {
let list = self.data.getitem_by_slice(vm, slice.to_saturated(vm)?)?;
Ok(vm.ctx.new_tuple(list).into())
Expand All @@ -2272,7 +2272,7 @@ mod _sqlite3 {
.inner(vm)?
.description
.clone()
.ok_or_else(|| vm.new_value_error("no description in Cursor"))?;
.unwrap_or_else(|| vm.ctx.empty_tuple.clone());

Ok(Self { data, description })
}
Expand Down
Loading