A direct test of the validity of the use of pseudopotentials in molecules