Skip to content

[smart_holder] Debugging test_cross_module_exception_translator issue #4053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ repos:
rev: "4.0.1"
hooks:
- id: flake8
exclude: ^(docs/.*|tools/.*)$
exclude: ^(docs/.*|tools/.*|ubench/.*)$
additional_dependencies: *flake8_dependencies

# PyLint has native support - not always usable, but works for us
Expand Down
3 changes: 3 additions & 0 deletions tests/namespace_visibility_1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "pybind11/pybind11.h"

PYBIND11_MODULE(namespace_visibility_1, m) { m.doc() = "ns_vis_1"; }
3 changes: 3 additions & 0 deletions tests/namespace_visibility_2.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "pybind11/pybind11.h"

PYBIND11_MODULE(namespace_visibility_2, m) { m.doc() = "ns_vis_2"; }
13 changes: 13 additions & 0 deletions tests/test_namespace_visibility.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import namespace_visibility_1
import namespace_visibility_2
import pytest


def test_namespace_visibility():
modules = (
namespace_visibility_1,
namespace_visibility_2,
)
for m in modules:
if m.__doc__ != "ns_vis_1":
pytest.skip(f"Not surprised: {m.__doc__}")