REF/TST: Add more pytest idiom to test_read_fwf.py
Also refactors out a compression writing utility function originally just for `test_compression.py`.

xref https://github.com/pandas-dev/pandas/pull/22200#issuecomment-448525434