Avoid conversion to `int_` rhs argument of enum eq/ne (#1912)
* fix: Avoid conversion to `int_` rhs argument of enum eq/ne
* test: compare unscoped enum with strings
* suppress comparison to None warning
* test unscoped enum arithmetic and comparision with unsupported type
diff --git a/tests/test_enum.cpp b/tests/test_enum.cpp
index 498a00e..3153089 100644
--- a/tests/test_enum.cpp
+++ b/tests/test_enum.cpp
@@ -13,11 +13,13 @@
// test_unscoped_enum
enum UnscopedEnum {
EOne = 1,
- ETwo
+ ETwo,
+ EThree
};
py::enum_<UnscopedEnum>(m, "UnscopedEnum", py::arithmetic(), "An unscoped enumeration")
.value("EOne", EOne, "Docstring for EOne")
.value("ETwo", ETwo, "Docstring for ETwo")
+ .value("EThree", EThree, "Docstring for EThree")
.export_values();
// test_scoped_enum