diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_simple.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/test_simple.py b/tests/test_simple.py index e971e22..eb03384 100644 --- a/tests/test_simple.py +++ b/tests/test_simple.py @@ -26,8 +26,7 @@ class MountFlagsTest(unittest.TestCase): except ValueError: continue self.assertEqual( - linuxnamespaces.MountFlags.fromstr(text), - flag + linuxnamespaces.MountFlags.fromstr(text), flag ) @@ -230,16 +229,12 @@ class UnshareIdmapTest(unittest.TestCase): @pytest.mark.forked def test_unshare_user_idmap(self) -> None: uidmaps = [ - linuxnamespaces.IDMapping( - 0, self.uidalloc.allocate(65536), 65536 - ), + linuxnamespaces.IDMapping(0, self.uidalloc.allocate(65536), 65536), linuxnamespaces.IDMapping(65536, os.getuid(), 1), ] self.assertNotEqual(os.getuid(), uidmaps[0].outerstart) gidmaps = [ - linuxnamespaces.IDMapping( - 0, self.gidalloc.allocate(65536), 65536 - ), + linuxnamespaces.IDMapping(0, self.gidalloc.allocate(65536), 65536), linuxnamespaces.IDMapping(65536, os.getgid(), 1), ] pid = os.getpid() @@ -260,17 +255,13 @@ class UnshareIdmapTest(unittest.TestCase): @pytest.mark.forked def test_populate_dev(self) -> None: uidmaps = [ - linuxnamespaces.IDMapping( - 0, self.uidalloc.allocate(65536), 65536 - ), + linuxnamespaces.IDMapping(0, self.uidalloc.allocate(65536), 65536), # Also map our own uid to make coverage testing work linuxnamespaces.IDMapping(65536, os.getuid(), 1), ] self.assertNotEqual(os.getuid(), uidmaps[0].outerstart) gidmaps = [ - linuxnamespaces.IDMapping( - 0, self.gidalloc.allocate(65536), 65536 - ), + linuxnamespaces.IDMapping(0, self.gidalloc.allocate(65536), 65536), linuxnamespaces.IDMapping(65536, os.getgid(), 1), ] pid = os.getpid() |