FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonnet/tests/test_import.py at python3.14 · guywithface/pythonnet · GitHub
guywithface
/
pythonnet
Public
forked from
pythonnet/pythonnet
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonnet
/
tests
/
test_import.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (16 loc) · 649 Bytes
Breadcrumbs
pythonnet
/
tests
/
test_import.py
Copy path
File metadata and controls
22 lines (16 loc) · 649 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -*- coding: utf-8 -*-
"""Test the import statement."""
import
pytest
import
sys
def
test_relative_missing_import
():
"""Test that a relative missing import doesn't crash.
Some modules use this to check if a package is installed.
Relative import in the site-packages folder"""
with
pytest
.
raises
(
ImportError
):
from
.
import
_missing_import
def
test_import_all_on_second_time
():
"""Test import all attributes after a normal import without '*'.
Due to import * only allowed at module level, the test body splitted
to a module file."""
from
.
import
importtest
del
sys
.
modules
[
importtest
.
__name__
]
Back
|
FazBrowse Home
|
New Git URL