def test_passing_unicode_should_give_unicode(p): from watchdog.utils.unicode_paths import str_cls path = str_cls(p('')) assert isinstance(p(''), str_cls) event_queue = Queue() emitter = Emitter(event_queue, ObservedWatch(path, recursive=True)) emitter.start() touch(p('a')) event = event_queue.get(timeout=5)[0] assert isinstance(event.src_path, str_cls)
def test_passing_unicode_should_give_unicode(): start_watching(str_cls(p(""))) touch(p('a')) event = event_queue.get(timeout=5)[0] assert isinstance(event.src_path, str_cls)