aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_fileutils.py7
-rw-r--r--tests/test_osutils.py4
2 files changed, 1 insertions, 10 deletions
diff --git a/tests/test_fileutils.py b/tests/test_fileutils.py
index 356eb74d..de8a1f7d 100644
--- a/tests/test_fileutils.py
+++ b/tests/test_fileutils.py
@@ -122,13 +122,6 @@ class TestAtomicWriteFile:
af.close()
-def cpy_setup_class(scope, func_name):
- if getattr(fileutils, "native_%s" % func_name) is getattr(fileutils, func_name):
- scope["skip"] = "extensions disabled"
- else:
- scope["func"] = staticmethod(getattr(fileutils, func_name))
-
-
class Test_readfile:
func = staticmethod(fileutils.readfile)
diff --git a/tests/test_osutils.py b/tests/test_osutils.py
index fac98532..a60bb15f 100644
--- a/tests/test_osutils.py
+++ b/tests/test_osutils.py
@@ -10,7 +10,6 @@ from unittest import mock
import pytest
from snakeoil import osutils
from snakeoil.contexts import Namespace
-from snakeoil.fileutils import touch
from snakeoil.osutils import native_readdir, supported_systems, sizeof_fmt
from snakeoil.osutils.mount import MNT_DETACH, MS_BIND, mount, umount
@@ -114,8 +113,7 @@ class TestEnsureDirs:
def test_path_is_a_file(self, tmp_path):
# fail if passed a path to an existing file
- path = tmp_path / "file"
- touch(path)
+ (path := tmp_path / "file").touch()
assert path.is_file()
assert not osutils.ensure_dirs(path, mode=0o700)