Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bytes constructor test change compatible with PR pybind#2380 (pybind#…
…2390) * Rolling back PR pybind#2340 change to tests/test_pytypes.py (only this one file). The two other files changed with PR pybind#2340 are not affected by this partial rollback. This partial rollback enables cherry-picking a commit from PR pybind#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 pybind#2380.
- Loading branch information