From 226e83eb8f0662f302c7f98c6b77bf88fae01997 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 11 Jun 2024 23:00:14 +0200 Subject: fix formatting and spelling errors No functional changes. --- tests/test_simple.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'tests') 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() -- cgit v1.2.3