wait, what fungus? I am allergic "to" exactly those two nuts but can't find mention of this online.
Apparently, from what I read today, those two are caused by sharing a similar protein, and nothing at all to do with a fungus. It did say that both are susceptible to the aflatoxin fungus, but that apparently can contaminate lots of other things and if it's detected, the affected nuts, and sometimes even the whole batch, are destroyed. So, I guess it's not that after all, and I'm kind of at a loss as to what it was I remember reading from before.
Sorry for leading you down a dead end.
BTW what I also read today said there are other things that cross-react with cashew and pistachio, such as pink peppercorns, so if you're allergic to the nuts, you might want to check what else might affect you.