Let me expand upon Mariano's comment.
I claim that if $X$ is a variety of dimension $n \geq$ 2, then $\Gamma(\mathcal O_X,X)$ and $\Gamma(\mathcal O_X,X \backslash pt)$ are isomorphic.
(since removing a point makes a variety incomplete, this would disprove the assertion that checking on global sections is enough)
We have a natural map $\varphi:\mathcal O_X \to \mathcal O_{X\backslash pt}$ by restriction. It is injective, since if a function is zero on an open set, it is zero everywhere.
So the question becomes: can every function defined on $X \backslash pt$ be extended to a function on $X$?
This is answered in the affirmative for normal varieties in this question answer.