summaryrefslogtreecommitdiff
blob: f0b8b636543ae45da3da90152bcec6ab45f69a1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff --git a/importlib_metadata/tests/test_main.py b/importlib_metadata/tests/test_main.py
index 38ec884..0ab1cf1 100644
--- a/importlib_metadata/tests/test_main.py
+++ b/importlib_metadata/tests/test_main.py
@@ -2,11 +2,17 @@
 from __future__ import unicode_literals
 
 import re
+import sys
 import textwrap
 import unittest
 import importlib
 import importlib_metadata
 
+if sys.hexversion > 0x3080000:
+    from importlib.metadata import (
+        Distribution as SysDistribution,
+        )
+
 from . import fixtures
 from .. import (
     Distribution, EntryPoint, MetadataPathFinder,
@@ -157,8 +163,12 @@ class DiscoveryTests(fixtures.EggInfoPkg,
 
     def test_package_discovery(self):
         dists = list(distributions())
+        if sys.hexversion > 0x3080000:
+            dist_classes = (Distribution, SysDistribution)
+        else:
+            dist_classes = (Distribution)
         assert all(
-            isinstance(dist, Distribution)
+            isinstance(dist, dist_classes)
             for dist in dists
             )
         assert any(