BUG: Fixed test with unnecessary dependency on matplotlib