When you run pytest test_foo.py test_foo.py you want to run tests twice actually.
Same for pytest test_foo.py::test_1 test_foo.py.
While with the latter it might make sense to not run test_1 twice, skipping duplicates is only implemented/handled on the filename level currently. anyway.
Ref: ab6aef1 - there is no motivation mentioned for why this was needed in the first place.