You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bytes constructor test change compatible with PR #2380 (#2390)
* Rolling back PR #2340 change to tests/test_pytypes.py (only this one file).
The two other files changed with PR #2340 are not affected by this partial rollback.
This partial rollback enables cherry-picking a commit from PR #2380.
* test_constructors() fix for Python 2.
Preparation for changing `pybind11::str` to only hold `PyUnicodeObject` (NOT also `bytes`).
Currently test_constructors passes with Python 2 only because `pybind11::str` can also hold a Python 2 `PyStringObject` (or the equivalent `PyBytesObject` in Python 3). Changing the test to exercise conversions for `PyUnicodeObject` makes it consistent between Python 2 and 3, and removes this small obstacle to the planned `pybind11::str` change.
Tests for `bytes` conversions will be added separately.
* Adding test_constructors test for bytes, on top of cherry-picked commit from PR #2380.
0 commit comments