These are steps for attempting to reproduce this test failure.
If you don't already have a local CPython clone, go to wherever you clone repositories and execute:
git clone [email protected]:python/cpython.git
cd cpythonThen proceed to the next step
Once cloned, you need to add my fork as a remote and fetch my branches
git remote add pganssle [email protected]:pganssle/cpython.git
git fetch pgansslegit checkout failing_fix_surrogate_strftimeIf this doesn't work, you can check it out by commit id:
git checkout b643da871aAssuming you have the build dependencies installed, you can do this to build CPython:
./configure
makeFor more details on building CPython, see the Python dev guide.
To save yourself some time, just execute the test_datetime tests:
./python -m test test_datetimeThough if you want to run the full test suite, you can with:
./python -m test
While it doesn't help directly with reproducing the failure, note that the erroneous output reported in the tests reflects a case of encoding with
surrogatepass, then decoding withsurrogateescape: