Commit a48a3bb
Roman Inflianskas
Fix distribution name normalization (PEP-0503) (#2144)
Current logic in `test_installed_modules` does not properly handle
distributions with underscores. On my machine I get the following error
while running tests:
```
tests/integrations/modules/test_modules.py:60: in test_installed_modules
assert installed_modules == pkg_resources_modules
E AssertionError: assert {'aiven-clien...'22.2.0', ...} == {'aiven-clien...'22.2.0', ...}
E Omitting 93 identical items, use -vv to show
E Left contains 1 more item:
E {'tomli_w': '1.0.0'}
E Right contains 1 more item:
E {'tomli-w': '1.0.0'}
E Use -v to get more diff
```
This change fixes distribution name normalization by applying the code
from PEP-0503 (https://peps.python.org/pep-0503/#normalized-names).1 parent 72f1e92 commit a48a3bb
1 file changed
+22
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
10 | 21 | | |
11 | 22 | | |
12 | 23 | | |
| |||
33 | 44 | | |
34 | 45 | | |
35 | 46 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
43 | 51 | | |
44 | 52 | | |
45 | | - | |
46 | | - | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | | - | |
52 | | - | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | | - | |
56 | | - | |
| 62 | + | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | | - | |
60 | | - | |
| 66 | + | |
0 commit comments