MCPcopy
hub / github.com/gorakhargosh/watchdog / test_create_wrong_encoding

Function test_create_wrong_encoding

tests/test_emitter.py:100–111  ·  view source on GitHub ↗
(p: P, event_queue: TestEventQueue, start_watching: StartWatching)

Source from the content-addressed store, hash-verified

98 reason="Windows and macOS enforce proper encoding",
99)
100def 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)

Callers

nothing calls this directly

Calls 3

pFunction · 0.70
closeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…