From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pkgcore/snakeoil:master commit in: src/snakeoil/osutils/, tests/
Date: Sun, 25 Dec 2022 18:27:10 +0000 (UTC) [thread overview]
Message-ID: <1671992797.2e4f73760dcbf1fb15bea4c6a89e4a65012ef74d.arthurzam@gentoo> (raw)
commit: 2e4f73760dcbf1fb15bea4c6a89e4a65012ef74d
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 23 21:37:47 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 25 18:26:37 2022 +0000
URL: https://gitweb.gentoo.org/proj/pkgcore/snakeoil.git/commit/?id=2e4f7376
remove osutils.native_readdir.listdir
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
src/snakeoil/osutils/__init__.py | 2 +-
src/snakeoil/osutils/native_readdir.py | 2 --
tests/test_osutils.py | 8 +-------
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/snakeoil/osutils/__init__.py b/src/snakeoil/osutils/__init__.py
index 036a78df..1910859b 100644
--- a/src/snakeoil/osutils/__init__.py
+++ b/src/snakeoil/osutils/__init__.py
@@ -59,7 +59,7 @@ from . import native_readdir as module
# force utf8 codepaths yet.
from ..klass import steal_docs
-listdir = module.listdir
+listdir = os.listdir
listdir_dirs = module.listdir_dirs
listdir_files = module.listdir_files
readdir = module.readdir
diff --git a/src/snakeoil/osutils/native_readdir.py b/src/snakeoil/osutils/native_readdir.py
index b129a9bf..d7c2fd91 100644
--- a/src/snakeoil/osutils/native_readdir.py
+++ b/src/snakeoil/osutils/native_readdir.py
@@ -18,8 +18,6 @@ from stat import (
from ..mappings import ProtectedDict
-listdir = os.listdir
-
# we can still use the cpy pjoin here, just need to do something about the
# import cycle.
pjoin = os.path.join
diff --git a/tests/test_osutils.py b/tests/test_osutils.py
index 264d670d..fac98532 100644
--- a/tests/test_osutils.py
+++ b/tests/test_osutils.py
@@ -18,8 +18,7 @@ from snakeoil.osutils.mount import MNT_DETACH, MS_BIND, mount, umount
class ReaddirCommon:
@pytest.fixture
def subdir(self, tmp_path):
- subdir = tmp_path / "dir"
- subdir.mkdir()
+ (subdir := tmp_path / "dir").mkdir()
(tmp_path / "file").touch()
os.mkfifo((tmp_path / "fifo"))
return subdir
@@ -30,10 +29,6 @@ class ReaddirCommon:
class TestNativeListDir(ReaddirCommon):
- def test_listdir(self, tmp_path, subdir):
- assert set(native_readdir.listdir(tmp_path)) == {"dir", "fifo", "file"}
- assert native_readdir.listdir(subdir) == []
-
def test_listdir_dirs(self, tmp_path, subdir):
assert native_readdir.listdir_dirs(tmp_path) == ["dir"]
assert native_readdir.listdir_dirs(subdir) == []
@@ -46,7 +41,6 @@ class TestNativeListDir(ReaddirCommon):
return self._test_missing(
tmp_path,
(
- native_readdir.listdir,
native_readdir.listdir_dirs,
native_readdir.listdir_files,
),
reply other threads:[~2022-12-25 18:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1671992797.2e4f73760dcbf1fb15bea4c6a89e4a65012ef74d.arthurzam@gentoo \
--to=arthurzam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox