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
db529c80
Commit
db529c80
authored
Jan 12, 2021
by
Ralf W. Grosse-Kunstleve
Browse files
flake8 cleanup
parent
d3833d2c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
25 deletions
+22
-25
tests/test_cpp_base_py_derived.py
tests/test_cpp_base_py_derived.py
+20
-22
tests/test_private_first_base.py
tests/test_private_first_base.py
+0
-1
tests/test_smart_ptr_base_derived.py
tests/test_smart_ptr_base_derived.py
+2
-0
tests/test_smart_ptr_private_first_base.py
tests/test_smart_ptr_private_first_base.py
+0
-1
tests/test_type_caster_bare_interface_demo.py
tests/test_type_caster_bare_interface_demo.py
+0
-1
No files found.
tests/test_cpp_base_py_derived.py
View file @
db529c80
...
@@ -2,14 +2,12 @@
...
@@ -2,14 +2,12 @@
# pybind11 equivalent of Boost.Python test:
# pybind11 equivalent of Boost.Python test:
# https://github.com/rwgk/rwgk_tbx/blob/6c9a6d6bc72d5c1b8609724433259c5b47178680/tst_cpp_base_py_derived.py
# https://github.com/rwgk/rwgk_tbx/blob/6c9a6d6bc72d5c1b8609724433259c5b47178680/tst_cpp_base_py_derived.py
# See also: https://github.com/pybind/pybind11/issues/1333 (this was the starting point)
# See also: https://github.com/pybind/pybind11/issues/1333 (this was the starting point)
import
pytest
from
pybind11_tests
import
cpp_base_py_derived
as
m
from
pybind11_tests
import
cpp_base_py_derived
as
m
class
drvd
(
m
.
base
):
class
drvd
(
m
.
base
):
# noqa: N801
def
__init__
(
self
,
_num
=
200
):
def
__init__
(
self
,
_num
=
200
):
super
().
__init__
()
super
().
__init__
()
self
.
_drvd_num
=
_num
self
.
_drvd_num
=
_num
...
...
tests/test_private_first_base.py
View file @
db529c80
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
pytest
from
pybind11_tests
import
private_first_base
as
m
from
pybind11_tests
import
private_first_base
as
m
...
...
tests/test_smart_ptr_base_derived.py
View file @
db529c80
...
@@ -7,6 +7,7 @@ CBASE_GET_INT_RESULT = 90146438
...
@@ -7,6 +7,7 @@ CBASE_GET_INT_RESULT = 90146438
CDERIVED_GET_INT_RESULT
=
31607978
CDERIVED_GET_INT_RESULT
=
31607978
VDERIVED_GET_INT_RESULT
=
29852452
VDERIVED_GET_INT_RESULT
=
29852452
def
test_concrete
():
def
test_concrete
():
m
.
to_cout
(
""
)
m
.
to_cout
(
""
)
m
.
to_cout
(
""
)
m
.
to_cout
(
""
)
...
@@ -22,6 +23,7 @@ def test_concrete():
...
@@ -22,6 +23,7 @@ def test_concrete():
m
.
pass_shared_cderived
(
cb
)
m
.
pass_shared_cderived
(
cb
)
m
.
to_cout
(
""
)
m
.
to_cout
(
""
)
def
test_virtual
():
def
test_virtual
():
m
.
to_cout
(
""
)
m
.
to_cout
(
""
)
m
.
to_cout
(
""
)
m
.
to_cout
(
""
)
...
...
tests/test_smart_ptr_private_first_base.py
View file @
db529c80
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
pytest
from
pybind11_tests
import
smart_ptr_private_first_base
as
m
from
pybind11_tests
import
smart_ptr_private_first_base
as
m
...
...
tests/test_type_caster_bare_interface_demo.py
View file @
db529c80
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
pytest
from
pybind11_tests
import
type_caster_bare_interface_demo
as
m
from
pybind11_tests
import
type_caster_bare_interface_demo
as
m
...
...
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