Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
21d0eb46
Commit
21d0eb46
authored
Sep 20, 2019
by
Wenzel Jakob
Browse files
Fix Python 3.8 test regression
parent
e825205a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
tests/test_enum.py
tests/test_enum.py
+9
-6
No files found.
tests/test_enum.py
View file @
21d0eb46
...
@@ -192,12 +192,15 @@ def test_binary_operators():
...
@@ -192,12 +192,15 @@ def test_binary_operators():
def
test_enum_to_int
():
def
test_enum_to_int
():
m
.
test_enum_to_int
(
m
.
Flags
.
Read
)
import
sys
m
.
test_enum_to_int
(
m
.
ClassWithUnscopedEnum
.
EMode
.
EFirstMode
)
# Implicit conversion to integers is deprecated in Python >= 3.8
m
.
test_enum_to_uint
(
m
.
Flags
.
Read
)
if
sys
.
version_info
<
(
3
,
8
):
m
.
test_enum_to_uint
(
m
.
ClassWithUnscopedEnum
.
EMode
.
EFirstMode
)
m
.
test_enum_to_int
(
m
.
Flags
.
Read
)
m
.
test_enum_to_long_long
(
m
.
Flags
.
Read
)
m
.
test_enum_to_int
(
m
.
ClassWithUnscopedEnum
.
EMode
.
EFirstMode
)
m
.
test_enum_to_long_long
(
m
.
ClassWithUnscopedEnum
.
EMode
.
EFirstMode
)
m
.
test_enum_to_uint
(
m
.
Flags
.
Read
)
m
.
test_enum_to_uint
(
m
.
ClassWithUnscopedEnum
.
EMode
.
EFirstMode
)
m
.
test_enum_to_long_long
(
m
.
Flags
.
Read
)
m
.
test_enum_to_long_long
(
m
.
ClassWithUnscopedEnum
.
EMode
.
EFirstMode
)
def
test_duplicate_enum_name
():
def
test_duplicate_enum_name
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment