aidin36/tocc — pull request #87 by hlYassine (2014-10-04 15:13:42+00:00)
Title: issue82

The test that failed should raise the libtocc::BadPathError exception not the exception libtocc::BadAdressError, that said we should test the return of open() function.
Why the test fails? I think Ankit who have implemented the copy method to support sendfile() function, obviousely the test successefully passed in her pc because the system didn't have sendfile() and the exception raised is libtocc:BadAdressError when it tries to copy from source to destination, the source file doesn't even exist, in the otherhand when the system have sendfile() function no exception is handled.
Even with the fix I've made there is still a chance that the test fails.
here is a scenario where the test will fail:
1) the system doesn't have sendfile() function
2) the file exist
3) the copy of bytes from source to destination fails
==> raise badAdressError exception not BadPathError =>test fail
Catch framework doesn't support testing for raising multiple exceptions yet.