Short term memory for simple tasks is very important for flying. I've never had an actual cognitive test for hiring purposes, but training flights and simulator evaluations will definitely take care of that. Flying is a lot of really simple things you need to do in a time sensitive environment.
Take a simple clearance in a radar environment. Things said to you, you have to read them back and do them. Kindergarten stuff. Yet if there are three or more things said, the average pilot will struggle doing it all. Speed 180, turn right heading 210 to intercept the localizer, cleared ILS runway 24, maintain 2000 until established. If you write it down, you're adding another thread of activity to your brain. It's even worse if you don't have a shorthand system you can easily write and translate or if your writing looks like a prescription.
Of course there are tools available. Setting attitude alerter for altitude assignments, heading bug for headings, speed bug for speeds, standby in com2 for additional frequencies, FMS scratchpad for random things (especially if you can use it to populate relevant fields in the FMS like crossing restrictions or frequencies/codes).
Then there are other things like interrupted checklists or briefings where you have to remember where you were or what's 'to come' or a special consideration you briefed or an environmental consideration not normally present you need to compensate for. Memory minders like setting an odd altitude in the window awaiting a clearance, using landing lights for takeoff and landing clearance, stuffing a checklist in an odd place to remind you to complete something.
Bottom line is, if you struggle with these types of tests, you could be Albert Einstein and unable to perform the outwardly simple task of driving a plane.
If this is the case, then how early on in my training would I found out that it's not for me?