Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
b468a3ce
Commit
b468a3ce
authored
Jul 25, 2017
by
Jason Rhinelander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore undefined name `long` errors on Python 3
parent
3ed62218
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
tests/test_builtin_casters.py
+6
-6
No files found.
tests/test_builtin_casters.py
View file @
b468a3ce
...
@@ -151,10 +151,10 @@ def test_integer_casting():
...
@@ -151,10 +151,10 @@ def test_integer_casting():
assert
m
.
i32_str
(
2000000000
)
==
"2000000000"
assert
m
.
i32_str
(
2000000000
)
==
"2000000000"
assert
m
.
u32_str
(
2000000000
)
==
"2000000000"
assert
m
.
u32_str
(
2000000000
)
==
"2000000000"
if
sys
.
version_info
<
(
3
,):
if
sys
.
version_info
<
(
3
,):
assert
m
.
i32_str
(
long
(
-
1
))
==
"-1"
assert
m
.
i32_str
(
long
(
-
1
))
==
"-1"
# noqa: F821 undefined name 'long'
assert
m
.
i64_str
(
long
(
-
1
))
==
"-1"
assert
m
.
i64_str
(
long
(
-
1
))
==
"-1"
# noqa: F821 undefined name 'long'
assert
m
.
i64_str
(
long
(
-
999999999999
))
==
"-999999999999"
assert
m
.
i64_str
(
long
(
-
999999999999
))
==
"-999999999999"
# noqa: F821 undefined name
assert
m
.
u64_str
(
long
(
999999999999
))
==
"999999999999"
assert
m
.
u64_str
(
long
(
999999999999
))
==
"999999999999"
# noqa: F821 undefined name 'long'
else
:
else
:
assert
m
.
i64_str
(
-
999999999999
)
==
"-999999999999"
assert
m
.
i64_str
(
-
999999999999
)
==
"-999999999999"
assert
m
.
u64_str
(
999999999999
)
==
"999999999999"
assert
m
.
u64_str
(
999999999999
)
==
"999999999999"
...
@@ -174,10 +174,10 @@ def test_integer_casting():
...
@@ -174,10 +174,10 @@ def test_integer_casting():
if
sys
.
version_info
<
(
3
,):
if
sys
.
version_info
<
(
3
,):
with
pytest
.
raises
(
TypeError
)
as
excinfo
:
with
pytest
.
raises
(
TypeError
)
as
excinfo
:
m
.
u32_str
(
long
(
-
1
))
m
.
u32_str
(
long
(
-
1
))
# noqa: F821 undefined name 'long'
assert
"incompatible function arguments"
in
str
(
excinfo
.
value
)
assert
"incompatible function arguments"
in
str
(
excinfo
.
value
)
with
pytest
.
raises
(
TypeError
)
as
excinfo
:
with
pytest
.
raises
(
TypeError
)
as
excinfo
:
m
.
u64_str
(
long
(
-
1
))
m
.
u64_str
(
long
(
-
1
))
# noqa: F821 undefined name 'long'
assert
"incompatible function arguments"
in
str
(
excinfo
.
value
)
assert
"incompatible function arguments"
in
str
(
excinfo
.
value
)
...
...
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