(self, module_name)
| 689 | del sys.path[0] |
| 690 | |
| 691 | def _check_path_limitations(self, module_name): |
| 692 | # base directory |
| 693 | source_path_len = len(self.here) |
| 694 | # a path separator + `longname` (twice) |
| 695 | source_path_len += 2 * (len(self.longname) + 1) |
| 696 | # a path separator + `module_name` + ".py" |
| 697 | source_path_len += len(module_name) + 1 + len(".py") |
| 698 | try: |
| 699 | cached_path_len = (source_path_len + |
| 700 | len(importlib.util.cache_from_source("x.py")) - len("x.py")) |
| 701 | except NotImplementedError: |
| 702 | cached_path_len = source_path_len |
| 703 | if os.name == 'nt' and cached_path_len >= 258: |
| 704 | # Under Windows, the max path len is 260 including C's terminating |
| 705 | # NUL character. |
| 706 | # (see http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath) |
| 707 | self.skipTest("test paths too long (%d characters) for Windows' 260 character limit" |
| 708 | % cached_path_len) |
| 709 | elif os.name == 'nt' and verbose: |
| 710 | print("cached_path_len =", cached_path_len) |
| 711 | |
| 712 | def test_module(self): |
| 713 | self.maxDiff = None |
no test coverage detected