Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
carderne authored and newcomertv committed May 16, 2024
commit 3c487757d31d4f1f2da9ed4fc7647a2b919670e4
1 change: 0 additions & 1 deletion pyo3-macros-backend/src/pymethod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@ pub fn impl_py_getitem_def(
spec: FnSpec<'_>,
ctx: &Ctx,
) -> Result<MethodAndMethodDef> {

//
// APPROACH 1
// This is what the #[pymethods] macro uses
Expand Down
1 change: 1 addition & 0 deletions pytests/tests/test_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def test_tuple_enum_field_getters():
assert tuple_variant._1 == 3.14
assert tuple_variant._2 is False


def test_tuple_enum_index_getter():
tuple_variant = enums.TupleEnum.Full(42, 3.14, False)
assert tuple_variant[0] == 42