GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — pythonnet/tests/test_import.py at master · pythonnet/pythonnet Expand file tree/ Copy pathtest_import.pyMore file actions 27 lines (20 loc) · 814 Bytes / Copy pathtest_import.pyFile metadata and controls27 lines (20 loc) · 814 Bytes 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 # -*- coding: utf-8 -*- """Test the import statement.""" import pytest import sys # Unused import to preload the class # # This resulted in the FileStream name missing from the wildcard import later from System.IO import FileStream # noqa: F401 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__] |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |