Not so for *A and oneworld... check the rules - the detail is there. It usually revolves around the phrase "marketed and operated" by a partner.
There are two scenarios...
DIRECT PARTNER: You have an FFP card with X airline's programme. You can earn miles on all (qualifying) fares that have X's code on the ticket, regardless of whether X or Y operates the metal. (Where X is in an alliance and Y is non-alliance partner).
PARTNER OF A PARTNER: You have an FFP card from airline Z which is in the alliance. You have tickets with X (in the same alliance) - you will earn miles if X operates the metal. You will not, if Y (which is not in the alliance) operates the metal.