From fbcee1081a1644a84b6f53795493327008a582c8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 19 Jul 2021 15:14:38 +0100 Subject: tests: Exercise negative variant_level for UnixFd type Signed-off-by: Simon McVittie --- test/test-standalone.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test-standalone.py b/test/test-standalone.py index cd967a6..7ec6e47 100755 --- a/test/test-standalone.py +++ b/test/test-standalone.py @@ -612,6 +612,9 @@ class TestMessageMarshalling(unittest.TestCase): with self.assertRaises(TypeError): types.UnixFd(plain_fd, variant_level='nope') + + with self.assertRaises(ValueError): + types.UnixFd(plain_fd, variant_level=-1) finally: os.close(plain_fd) -- cgit v1.2.1