The Fisher information is the Riemannian metric on the parameter manifold. The expectation is taken by summing over a discrete support or by the midpoint rule on a continuous grid, and the score is a central difference of the log density. For N(theta, sigma^2) the metric is 1/sigma^2 and for Bernoulli(theta) it is 1/(theta(1 - theta)); both closed forms are what the tests check.
References
Amari (1985), Differential-Geometrical Methods in Statistics, Lecture Notes in Statistics 28, Springer. doi:10.1007/978-1-4612-5056-2
