TST: Fix boxplot test for python3

Closes #8091.