When the partnership borrows a bunch of money its cash account goes up by the amount borrowed and its liabilities also go up by the same amount and ... and there's no effect on the partnership's net assets or on the partner's *capital account*. However, since a partner's
*tax basis* in his partnership interest is - by definition - his tax basis in his capital account
*plus* his share of the partnership's liabilities, the partner's tax basis increases by his share of the partnership's liabilities, which is $1,000 in your example.
And when the partner sells his interest in the partnership, his proceeds and his tax basis are *both* higher by his share of the partnership's liabilities, again this is by definition. The partner's capital account doesn't move, in your example, except for his share of the K-1 income, $2K.
Capital account: $10K plus $2K income = $12K. Tax basis: $10K plus $2K income plus $1K share of debt = $13K. On the sale: Proceeds are $15K of cash plus $1K of debt relief $16K, and tax basis is $12K (capital account) plus $1K (share of debt) = $13K. Proceeds less basis ($16K - $13K) = taxable gain = $3K.
If the partner's interest sells for $15K cash, it doesn't make any difference if, or how much, the partnership may have borrowed: The gain will be the same. For tax purposes, you don't really have to look inside the partnership, not even peek, to see the assets and liabilities of the partnership; when it's time for a sale, the computation of gain is all taken care of by reference to the partner's "outside" basis, which includes a share of the partnership's debts, since that same share of debt amount is included in the amount realized by the partner on the sale of the his interest.
I hate examples; they always have to be *right*...