Split off from T128990: English Wikisource has more good pages than French Wikisource, breaking the WikiStats tests for the largest wikisource, wikistats_tests test_xml is failing with the xml data values containing str on Python 2 instead of unicode, which makes it slightly incompatible with the default csv implementation.
Originally identified by @Xqt and solution proposed as https://gerrit.wikimedia.org/r/269730
Additional asserts where added in 0170860dd to confirm the problem.
The problem has not been reproducible on Travis Unix or Appveyor Windows CI builds.