  Consider a pair $(R, \ba^t)$ where $R$ is a ring of positive characteristic,
$\ba$ is an ideal such that $a \cap $R^{\circ} \neq \emptyset$, and $t > 0$ is
a real number. In this situation we have the ideal $\tau_R(\ba^t)$, the
generalized test ideal associated to $(R, a^t)$ as defined by Hara and Yoshida.
We show that $\tau_R(a^t) \cap R^{\circ}$ is made up of appropriately defined
generalized test elements which we call \emph{sharp test elements}. We also
define a variant of $F$-purity for pairs, \emph{sharp $F$-purity}, which
interacts well with sharp test elements and agrees with previously defined
notions of $F$-purity in many common situations. We show that if $(R, \ba^t)$
is sharply F-pure, then $\tau_R(\ba^t)$ is a radical ideal. Furthermore, by
following an argument of Vassilev, we show that if $R$ is a quotient of an
$F$-finite regular local ring and $(R, \ba^t)$ is sharply $F$-pure, then
$R/{\tau_R(\ba^t)}$ itself is $F$-pure. We conclude by showing that sharp
$F$-purity can be used to define the $F$-pure threshold. As an application we
show that the $F$-pure threshold must be a rational number under certain
hypotheses.
