TST: improve test_long_str and add documentation
Merge pull request #4032 from juliantaylor/format-test

TST: improve test_long_str and add documentation