Add guard clause to check if os has sendfile function
@@ -17,6 +17,7 @@ assert_raises(FileNotFoundError,
assert_raises(FileNotFoundError,
lambda: os.rename('DOES_NOT_EXIST', 'DOES_NOT_EXIST 2'))
+if hasattr(os, "sendfile"):
src_fd = os.open('README.md', os.O_RDONLY)
dest_fd = os.open('destination.md', os.O_RDWR | os.O_CREAT)
src_len = os.stat('README.md').st_size
