TST: add tests to validate margin results for pivot (#25815)
- [x ] closes #25815
- [x ] tests added / passed
- [x ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
