| 98 | reason="Windows and macOS enforce proper encoding", |
| 99 | ) |
| 100 | def test_create_wrong_encoding(p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None: |
| 101 | start_watching() |
| 102 | open(p("a_\udce4"), "a").close() |
| 103 | |
| 104 | event = event_queue.get(timeout=5)[0] |
| 105 | assert event.src_path == p("a_\udce4") |
| 106 | assert isinstance(event, FileCreatedEvent) |
| 107 | |
| 108 | if not platform.is_windows(): |
| 109 | event = event_queue.get(timeout=5)[0] |
| 110 | assert os.path.normpath(event.src_path) == os.path.normpath(p("")) |
| 111 | assert isinstance(event, DirModifiedEvent) |
| 112 | |
| 113 | |
| 114 | @pytest.mark.flaky(max_runs=5, min_passes=1, rerun_filter=rerun_filter) |