Issue #8966: Fix ctypes tests for Windows

I removed the implicit conversion from str to bytes.
3 files changed