summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2024-06-11 23:00:14 +0200
committerHelmut Grohne <helmut@subdivi.de>2024-06-11 23:00:14 +0200
commit226e83eb8f0662f302c7f98c6b77bf88fae01997 (patch)
tree83e88fb06252ce6639b2a0b9fc161166a88ea23f /tests
parente2f359f814805285e7ece3c9edba2cc93c958540 (diff)
downloadpython-linuxnamespaces-226e83eb8f0662f302c7f98c6b77bf88fae01997.tar.gz
fix formatting and spelling errors
No functional changes.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_simple.py19
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()