You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
658 B
24 lines
658 B
import errno
|
|
|
|
from leapp.libraries.common.testutils import make_IOError, make_OSError
|
|
|
|
|
|
def test_make_IOError():
|
|
exception = make_IOError(errno.ENOENT)
|
|
assert isinstance(exception, IOError)
|
|
assert exception.errno == errno.ENOENT
|
|
|
|
exception = make_IOError(errno.ENOTDIR)
|
|
assert isinstance(exception, IOError)
|
|
assert exception.errno == errno.ENOTDIR
|
|
|
|
|
|
def test_make_OSError():
|
|
exception = make_OSError(errno.ENOENT)
|
|
assert isinstance(exception, OSError)
|
|
assert exception.errno == errno.ENOENT
|
|
|
|
exception = make_OSError(errno.ENOTDIR)
|
|
assert isinstance(exception, OSError)
|
|
assert exception.errno == errno.ENOTDIR
|