diff --git a/tests/test_emitter.py b/tests/test_emitter.py index 10f68fdf..9e48fa8f 100644 --- a/tests/test_emitter.py +++ b/tests/test_emitter.py @@ -15,6 +15,7 @@ # limitations under the License. import os +import stat import time import pytest import logging @@ -200,7 +201,9 @@ def test_chomod(): mkfile(p('a')) start_watching() - os.chmod(p('a'), 0o744) + # Note: We use S_IREAD here because chmod on Windows only + # allows setting the read-only flag. + os.chmod(p('a'), stat.S_IREAD) expect_event(FileModifiedEvent(p('a')))