diff options
| author | Árni Dagur <arni@dagur.eu> | 2021-06-26 16:20:29 +0000 |
|---|---|---|
| committer | Árni Dagur <arni@dagur.eu> | 2021-06-26 19:10:50 +0000 |
| commit | fb1832feb868a81e2d10a1707c57df4623304313 (patch) | |
| tree | f77f31d340f19b0e4d96a92ccc23cdeb6b135738 /tests/test_imports.py | |
| parent | 0d5c8b8cfa1025c29b96db3c52ff54a7d204923f (diff) | |
Create a custom exception type for this library
Diffstat (limited to 'tests/test_imports.py')
| -rw-r--r-- | tests/test_imports.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_imports.py b/tests/test_imports.py index 7692483..09ef5d5 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py | |||
| @@ -14,16 +14,18 @@ def get_added_classes(): | |||
| 14 | match = re.match(r"m\.add_class::<(.+)>\(\)\?;", line.strip()) | 14 | match = re.match(r"m\.add_class::<(.+)>\(\)\?;", line.strip()) |
| 15 | if match is not None: | 15 | if match is not None: |
| 16 | classes.append(match.group(1)) | 16 | classes.append(match.group(1)) |
| 17 | continue | ||
| 17 | return classes | 18 | return classes |
| 18 | 19 | ||
| 19 | 20 | ||
| 20 | def test_added_classes(): | 21 | def test_added_classes(): |
| 21 | """ | 22 | """ |
| 22 | Make sure that there's no class that we added in Rust but didn't import in | 23 | Make sure that there's no class that we added in Rust but didn't import in |
| 23 | `__init__.py` and vice versa. | 24 | `__init__.py`. |
| 24 | """ | 25 | """ |
| 25 | added_classes = get_added_classes() | 26 | added_classes = get_added_classes() |
| 26 | assert added_classes == list(adblock.__all__) | 27 | for c in added_classes: |
| 28 | assert c in adblock.__all__ | ||
| 27 | 29 | ||
| 28 | 30 | ||
| 29 | def test_dunder_all_classes_imported(): | 31 | def test_dunder_all_classes_imported(): |
