Where I went undergrad they required either passing a swim test or taking a phys ed swim class to graduate. Presumably there were medical exemptions. (And I actually was exempted because I had a Scuba cert which itself required a swim test.) I don’t know how inflexible they were come graduation if push came to shove.