Spirometry tests should be avoided in situations such as active tuberculosis, coughing of blood, and pneumothorax, among other complications.