summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2024-06-11 22:40:29 +0200
committerHelmut Grohne <helmut@subdivi.de>2024-06-11 22:40:29 +0200
commite2f359f814805285e7ece3c9edba2cc93c958540 (patch)
tree9357a253df4b5009b058dae4dedee4828eaa8f9d /tests
parente7f8500644717d3e4049cb981472e376c8984055 (diff)
downloadpython-linuxnamespaces-e2f359f814805285e7ece3c9edba2cc93c958540.tar.gz
improve typing
linuxnamespaces/__init__.py: * linuxnamespaces.filedescriptor only exports FileDescriptor. By importing *, we re-export it implicitly. linuxnamespaces/atlocation.py: * PathLike should be parameterized and we no longer allow bytes there. linuxnamespaces/tarutils.py: * Resolve dict vs Mapping. tests/test_simple.py: * Establish expected type to mypy. examples/unschroot.py: * pidfd is first an int and later a FileDescriptor, but we always use it as int. * Also tell mypy that we cannot get NULL from waitid.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_simple.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_simple.py b/tests/test_simple.py
index 878e985..e971e22 100644
--- a/tests/test_simple.py
+++ b/tests/test_simple.py
@@ -161,6 +161,7 @@ class AsnycioTest(unittest.IsolatedAsyncioTestCase):
self.assertTrue(fut.done())
exc = fut.exception()
self.assertIsInstance(exc, OSError)
+ assert isinstance(exc, OSError) # also tell mypy
self.assertEqual(exc.errno, errno.EPIPE)