TST: Change tests to look at array formatting only

The tests were looking at the formatting of other elements in the string
which is not relevant for the things testsed in this case. By looking
only at the array formatting, we guarantee consistency across systems.