Battles use a snapshot of the trainer's current party — they are not notified and do not lose anything.
Your Pokémon earn real EXP and money for every faint.
Ace Trainer Alex
"Team not quite ready for a real fight? Bring them down to my Training Gym first. Pick a sparring partner, battle as many times as you like, and walk back in here with a team that hits a lot harder."
Visit the Training Gym