Cave mollies (Poecilia mexicana) inhabit a dark Mexican cave, where visual communication is impossible. I observed the preference of cave molly females to associate with a non-infected male or a male infected with a pathogenic bacterium (Mycobacterium sp.) which causes the formation of large blisters around the eyes of infected fish. Females preferred to stay near the non-infected male only when the two stimulus males were separated from the female by transparent Plexiglas in light, but not when the males were separated by a wiremesh in light (where vision was to some extent hindered, but the females perceived non-visual cues) or in darkness (where only non-visual cues were available). I conclude that the visually mediated preference for non-infected males has been maintained during the colonisation of the lightless habitat, but a preference for this trait on the basis of non-visual cues did not evolve. The cave habitat may be poor in pathogens, resulting in low selection pressure to evolve a non-visual preference for males without bacterial infection.