Funny, I just sat down and watched 'Thine own self' season 7 episode 16, and that appears to be the episode I was looking for.
It is also the episode ini which Data is "stranded" on a pre-warp civilazion planet, and has lost his memory. I did not remember those two stories to be in the same episode, but oh well.
Also I was wrong, it wasn't Dr. Crusher who was taking the test, but rather Deanna Troy who was.
So I guess this concludes this thread. Sorry for wasting your time