8000 [pytree] hardcode values for `none_is_leaf` and `namespace` in C++ py… · XuehaiPan/pytorch@16e991c · GitHub
[go: up one dir, main page]

Skip to content

Commit 16e991c

Browse files
committed
[pytree] hardcode values for none_is_leaf and namespace in C++ pytree
ghstack-source-id: e4e3c3d Pull Request resolved: pytorch#114858
1 parent 25b8352 commit 16e991c

File tree

2 files changed

+44
-402
lines changed

2 files changed

+44
-402
lines changed

test/test_pytree.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,10 @@ def test_aligned_public_apis(self):
4343
cxx_signature = inspect.signature(cxx_api)
4444
py_signature = inspect.signature(py_api)
4545

46-
# The C++ pytree APIs provide more features than the Python APIs.
47-
# The Python APIs are a subset of the C++ APIs.
48-
# Check the signature of the Python API is a subset of the C++ API.
46+
# Check the parameter names are the same.
4947
cxx_param_names = list(cxx_signature.parameters)
5048
py_param_names = list(py_signature.parameters)
51-
self.assertTrue(
52-
set(cxx_param_names).issuperset(py_param_names),
53-
msg=(
54-
f"C++ parameter(s) ({cxx_param_names}) "
55-
f"not in Python parameter(s) ({py_param_names})"
56-
),
57-
)
49+
self.assertEqual(cxx_param_names, py_param_names)
5850

5951
# Check the positional parameters are the same.
6052
cxx_positional_param_names = [

0 commit comments

Comments
 (0)
0