To both; I'm not going to claim to be an expert here but we looked round a property that had tenants in. Two things;- (1) our mortgage was not valid for tenanted properties so it could not be approved until the property was vacant (read: not with tenants having given notice, they need to be
out). (2) our solicitor's paperwork mentioned multiple times 'vacant possession' meaning nothing would go ahead until the property is empty.
In short, the impression we got was that no landlord should be trying to sell a house with tenants in situ. Unless he only wants to sell it to another landlord, or someone who is prepared to change their mortgage to allow BTL.
Also, this might be useful;
https://england.shelter.org.uk/housing_advice/eviction/notice_periods_during_coronavirus Whilst we were looking to buy, the agent of the aforementioned property was like "oh we'll just find another house for them to move to" and was super-flippant. We had to remind them that due to current rules they'd have to give 6 months notice. Answer "oh, really I didn't know that"

lol agents...