(selenium_standalone)
| 1604 | |
| 1605 | @run_in_pyodide |
| 1606 | def test_windows_to_linux_path_import(selenium_standalone): |
| 1607 | import sys |
| 1608 | from importlib import invalidate_caches |
| 1609 | from pathlib import Path |
| 1610 | |
| 1611 | tmp_dir = Path("/tmp/my/temporary/directory/for/testing/import") |
| 1612 | tmp_dir.mkdir(parents=True, exist_ok=True) |
| 1613 | module_file = tmp_dir / "test_module.py" |
| 1614 | |
| 1615 | sys.path.append("C:\\tmp\\my\\temporary\\directory\\for\\testing\\import") |
| 1616 | invalidate_caches() |
| 1617 | |
| 1618 | try: |
| 1619 | import test_module |
| 1620 | |
| 1621 | raise AssertionError("Module should not be found yet") |
| 1622 | except ModuleNotFoundError: |
| 1623 | pass |
| 1624 | |
| 1625 | module_file.write_text("TEST_VALUE = 456") |
| 1626 | |
| 1627 | import test_module |
| 1628 | |
| 1629 | assert test_module.TEST_VALUE == 456 |
| 1630 | |
| 1631 | # cleanup |
| 1632 | module_file.unlink() |
| 1633 | tmp_dir.rmdir() |
| 1634 | |
| 1635 | |
| 1636 | def test_args(selenium_standalone_noload): |
nothing calls this directly
no test coverage detected
searching dependent graphs…