Dex's comment is correct, taxes are not recognized until you finish the transaction.
Here are some real life examples.
I routinely write covered call leaps. I do not recognize any income, unless I cover my position that year or the next year when either the option expires or it is exercised. So this year I'll take a short-term capital gain on the Jan 2008 calls which I wrote in 2007.
I also wrote puts in 2007 on some banks stocks which got exercised in 2008. For the banks stocks I sold (BAC), I'll subtract the premium I received from the put option from the basis for the stock. So I got $2 for a Jan 08 $40 put. I recently got $1.50 for Dec 2007 27.50 BAC call. If the call gets exercised; my basis for BAC will be $40 - $2 - 1.50 = $36.50 I'll receive 27.50 and take a $9 (plus commissions) loss on BAC. If wrote a Jan 2009 call I would report no taxes in 2008 on my BAC stock and options.
I will probably keep my BB&T stock since I have a profit on it, the put premium I got back in 2007 will reduce my basis (e.g. increase capital gains owed) until I sell the stock.