Buying a house in France does nothing toward getting you a long stay visa. On a student visa, or a visitor visa (without work permit) you have to show that you have private health insurance as part of the visa application process. And that health insurance is supposed to be paid up for a year in advance.
At the end of the visa term, when you renew your residence permit, you will have to show the next year's insurance paid up. It's only when you go to work in France (and getting the work permit is the "challenge" there) and start paying into the social insurance system (which includes health, retirement and a few other things) that you can claim the national benefits.
Cheers,
Bev