Looks like the check for AUTOPKGTEST_TMP is simply to determine that the test is being executed by autopkgtest. I don't know of a better best practice, and this is documented in the autopkgtest README so seems like a good approach.
The patch description is a bit incomplete, I might suggest a slight tweak to clarify:
+The test_path() does not work as expected when the tests are not run
+from the upstream source tree. When running under Autopkgtest, load
+ the .txt files relative to the current directory, instead of using
+test_path().
Looks like the check for AUTOPKGTEST_TMP is simply to determine that the test is being executed by autopkgtest. I don't know of a better best practice, and this is documented in the autopkgtest README so seems like a good approach.
The patch description is a bit incomplete, I might suggest a slight tweak to clarify:
+The test_path() does not work as expected when the tests are not run
+from the upstream source tree. When running under Autopkgtest, load
+ the .txt files relative to the current directory, instead of using
+test_path().
Rest of the packaging LGTM, +1.