File: test_error_tools.py

package info (click to toggle)
python-fs 2.4.12-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,276 kB
  • sloc: python: 11,724; makefile: 226; sh: 3
file content (15 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from __future__ import unicode_literals

import errno
import unittest

from fs.error_tools import convert_os_errors
from fs import errors as fserrors


class TestErrorTools(unittest.TestCase):
    def assert_convert_os_errors(self):

        with self.assertRaises(fserrors.ResourceNotFound):
            with convert_os_errors("foo", "test"):
                raise OSError(errno.ENOENT)