Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11_abseil
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_abseil
Commits
40c7e9dc
Commit
40c7e9dc
authored
Sep 04, 2024
by
pybind11_abseil authors
Committed by
Copybara-Service
Sep 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix status_testing_no_cpp_eh_test
PiperOrigin-RevId: 670957824
parent
baadf890
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
pybind11_abseil/compat/status_from_py_exc.cc
+1
-1
pybind11_abseil/tests/status_testing_no_cpp_eh_test_lib.py
+6
-6
No files found.
pybind11_abseil/compat/status_from_py_exc.cc
View file @
40c7e9dc
...
...
@@ -56,7 +56,7 @@ PyObject* PyStatusNotOkOrNone() {
static
PyObject
*
kImportedObj
=
nullptr
;
if
(
kImportedObj
==
nullptr
)
{
kImportedObj
=
py_base_utilities
::
ImportObjectOrReturnNone
(
"
google3.third_party.
pybind11_abseil.status"
,
"StatusNotOk"
);
"pybind11_abseil.status"
,
"StatusNotOk"
);
}
return
kImportedObj
;
}
...
...
pybind11_abseil/tests/status_testing_no_cpp_eh_test_lib.py
View file @
40c7e9dc
...
...
@@ -53,10 +53,10 @@ class StatusReturnTest(parameterized.TestCase):
expected
=
'OK'
else
:
expected
=
(
'INVALID_ARGUMENT: Unable to cast Python instance of type <class'
" 'list'> to C++ type 'absl::
Status'"
r"INVALID_ARGUMENT: Unable to cast Python instance of type <class"
r" 'list'> to C\+\+ type 'absl::(\w*::)?
Status'"
)
self
.
assert
Equal
(
self
.
tm
.
CallCallbackWithStatusReturn
(
cb
),
expected
)
self
.
assert
Regex
(
self
.
tm
.
CallCallbackWithStatusReturn
(
cb
),
expected
)
def
testAssertionErrorBare
(
self
):
# pylint: disable=invalid-name
...
...
@@ -117,10 +117,10 @@ class StatusOrReturnTest(parameterized.TestCase):
expected
=
'INVALID_ARGUMENT: TypeError: expecting int'
else
:
expected
=
(
'INVALID_ARGUMENT: Unable to cast Python instance of type <class'
" 'str'> to C++ type 'absl::
StatusOr<int>'"
r"INVALID_ARGUMENT: Unable to cast Python instance of type <class"
r" 'str'> to C\+\+ type 'absl::(\w*::)?
StatusOr<int>'"
)
self
.
assert
Equal
(
self
.
tm
.
CallCallbackWithStatusOrIntReturn
(
cb
),
expected
)
self
.
assert
Regex
(
self
.
tm
.
CallCallbackWithStatusOrIntReturn
(
cb
),
expected
)
class
StatusOrPyObjectPtrTest
(
absltest
.
TestCase
):
...
...
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