So if a student is required to flunk, would a student who isn't ready be allowed to test?
Yes, always, it was encouraged. No charge, a great workout, and the opportunity to see what's going to be expected of you when the time comes.
Since testing was always on a regular class night, nobody wanted to miss a workout. The only night testing would never be scheduled was Thursday night. That was sparring night. We might spar on any other night or day in addition, but Thursday night was always sparring. It was the busiest night in the dojo. Most fun, too.
And sometimes, promotions were awarded without a test. But when that happened, if there was a test the following week, the recently promoted person would always join the test. Just because nobody wanted to miss a workout. Can't say I blame them. IMO, if you don't love training, you probably shouldn't be in Martial Arts.