Pulmonary function testing
is designed to look at how well your lungs are working. The test is done as a part of a workup for people that are having problems with their breathing. The test is performed by having you blow air into a tube several times to measure the amount of air your lungs can hold, and the speed at which you inhale and exhale the air.
Pulmonary function testing is used as a diagnostic tool to diagnose many different types of lung diseases. Whether or not you smoked on the same day as the test will not effect most of the results. The only result that it will possibly effect is your diffusion capacity test, which is part of the pulmonary function testing. Smoking the same day will alter the results. Most of the measurements will be affected by the cumulative effect of your smoking over the years, not what you did that day.
I suggest that you schedule an appointment with your pulmonologist
prior to the pulmonary function testing. You can discuss what the test is likely to show and what additional benefit you may gain from having the test. You can discuss the smoking issue, but your doctor
is likely to tell you to stop smoking if you can. This is not because of the test, but rather because that is the best decision you can make for your health.