Skip to content

Commit

Permalink
Test added
Browse files Browse the repository at this point in the history
  • Loading branch information
rrzaripov committed Apr 23, 2019
1 parent 53854c1 commit b4a7699
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,15 @@ def test_recursive_off():

with pytest.raises(Empty):
event_queue.get(timeout=5)


def test_renaming_top_level_directory():
mkdir(p('a', 'b'), True)
mv(p('a'), p('a2'))
start_watching()
open(p('a2', 'b', 'c'), 'a').close()

event = event_queue.get(timeout=5)[0]
print(event)
assert event.src_path == p('a2', 'b', 'c')
assert isinstance(event, FileCreatedEvent)

0 comments on commit b4a7699

Please sign in to comment.