There are two kinds of "assessments" here.
One is the monthly fee or assessment or whatever it is called locally. The association's right to collect this fee is recorded generally as part of the deed and is usually listed on the Schedule B of the title commitment. It is like any other lien and generally must be paid as part of the closing, otherwise the title insurance would not cover it. Title insurance is, in effect, saying the title was checked for liens and defects, here's what we found, and we will defend you if another defect surfaces later. In my experience, these are paid by the seller from the seller's proceeds. I know some states do limit the sellers liability of these fees that accrue to an institutional seller that acquires a property in foreclosure (like Florida, 6 months or 1% of the sales price.
The other kind are one time special assessments, such as roofs or new siding or paving or whatever. In my experience, these are seller costs as long as they are were "ratified" (in other words, voted on and approved) prior to the sale.
This isn't legal advice, just my personal experience dealing with HOA's, condo associations and PUD's for 14 years.
_________________________
Broker-Owner Thirteen Years REO Experience
GRI,CRS,CRB,e-Pro
Some days I feel like the bug, other days I feel like the windshield