Restore $HOME after test has run (should fix #12765)
diff --git a/Lib/packaging/tests/test_dist.py b/Lib/packaging/tests/test_dist.py
index 48335e7..01a11ca 100644
--- a/Lib/packaging/tests/test_dist.py
+++ b/Lib/packaging/tests/test_dist.py
@@ -272,8 +272,11 @@
 
 class MetadataTestCase(support.TempdirManager,
                        support.LoggingCatcher,
+                       support.EnvironRestorer,
                        unittest.TestCase):
 
+    restore_environ = ['HOME']
+
     def setUp(self):
         super(MetadataTestCase, self).setUp()
         self.argv = sys.argv, sys.argv[:]