Hamilton Sheriff Court heard last week that James Lewis laughed as he warned the officer to stay away from him.
Lewis, 29, formerly of Spruce Way, Holytown, admitted charges of assault and threatening or abusive behaviour.
Mairi-Clare McMillan, prosecuting, said police were tipped off about a party taking place at another address in Spruce Way on April 10 last year.
It was only a few weeks after the country went into its first lockdown after the outbreak of the pandemic.
Ms McMillan told the court: "Officers were let in by the householder and were then approached by the accused. He was aggressive and shouted that the police needed a warrant to be there.
"Routine questions were asked and he replied 'Aye mate. I've got coronavirus'. Lewis was asked to provide his details, but he became more aggressive.
"As an officer approached him, he began to cough and laugh while stating 'I've got the coronavirus and you have to stay away from me'
"He was arrested and while being taken to Motherwell police station he made threats against the police. However, he later said he didn't have the virus and apologised."
Lewis also admitted breaching a bail curfew on three occasions last year.
His previous convictions include a stabbing in Wishaw that led to a 23-month jail sentence in 2018.
He is currently serving an eight-month sentence for threatening or abusive behaviour.
Defence agent Stephen MacBride said Lewis has had a drink problem, but is getting help with this in jail and has signed up for an anger management course.
The solicitor added: "His girlfriend is expecting their first child in October. On his release, it's his intention to make a fresh start with them.”
Sheriff Ray Small told Lewis, now of Croft Road, East Kilbride, the one-year stretch will begin when his current sentence ends in September. The sheriff stated: "The High Court has made clear that such behaviour towards the police during the pandemic will almost inevitably result in custody.”