Fixed some warning reports produced by pytest to point to the correct location of the warning in the user's code.