It's "sort of" settable at runtime.  There is a `sys.setdefaultencoding`, but it's removed by `site.py` (so it only really exists when bootstrapping the interpreter), since it causes dictionary hashes to change it's really dangerous to use during a running app.

You can do (and this is what I do for testing):

```
import sys
reload(sys)
sys.setdefaultencoding('ascii')

# try what's breaking
```

but I haven't had success doing this in the context of `py.test`.