TST: add message matches to pytest.raises in test_duplicate_labels.py GH30999
Reference https://github.com/pandas-dev/pandas/issues/30999

- [x] tests added / passed
- [x] passes `black pandas`
- [ ]  passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Hello! This is my first PR here. I followed the steps in the contributing guidelines [here](https://github.com/pandas-dev/pandas/blob/master/doc/source/development/contributing.rst#contributing-your-changes-to-pandas), but I didn't see anything about `git diff upstream/master -u -- "*.py" | flake8 --diff`. 

When I run the command locally, with `origin/master`, it returns no output. I get fatal with `upstream/master`. Is that expected, and if it isn't, could anyone advise on how to resolve the issue please? 

Thank you!