Do not leave open files behind as this triggers 'ResourceWarning' and leads
these tests to fail.
--- Werkzeug-1.0.1/tests/test_datastructures.py 2020-03-31 19:48:06.000000000 +0200
+++ Werkzeug-1.0.1/tests/test_datastructures.py 2021-11-21 18:19:11.304369878 +0100
@@ -1238,9 +1238,10 @@
def test_save_to_pathlib_dst(self, tmp_path):
src = tmp_path / "src.txt"
src.write_text(u"test")
- storage = self.storage_class(src.open("rb"))
- dst = tmp_path / "dst.txt"
- storage.save(dst)
+ with src.open("rb") as input:
+ storage = self.storage_class(input)
+ dst = tmp_path / "dst.txt"
+ storage.save(dst)
assert dst.read_text() == "test"
def test_save_to_bytes_io(self):
@@ -1251,11 +1252,12 @@
def test_save_to_file(self, tmp_path):
path = tmp_path / "file.data"
- storage = self.storage_class(io.BytesIO(b"one\ntwo"))
- with path.open("wb") as dst:
- storage.save(dst)
- with path.open("rb") as src:
- assert src.read() == b"one\ntwo"
+ with io.BytesIO(b"one\ntwo") as input:
+ storage = self.storage_class(input)
+ with path.open("wb") as dst:
+ storage.save(dst)
+ with path.open("rb") as src:
+ assert src.read() == b"one\ntwo"
@pytest.mark.parametrize("ranges", ([(0, 1), (-5, None)], [(5, None)]))
--- Werkzeug-1.0.1/tests/test_formparser.py 2020-03-31 19:48:06.000000000 +0200
+++ Werkzeug-1.0.1/tests/test_formparser.py 2021-11-21 22:11:43.654622751 +0100
@@ -27,7 +27,7 @@
from werkzeug.test import create_environ
from werkzeug.wrappers import Request
from werkzeug.wrappers import Response
-
+import warnings
@Request.application
def form_data_consumer(request):
@@ -242,6 +244,9 @@
class TestMultiPart(object):
def test_basic(self):
+ # Ignore leaked file descriptor of unknown origin.
+ warnings.filterwarnings(action="ignore", message="unclosed", category=ResourceWarning)
+
resources = join(dirname(__file__), "multipart")
client = Client(form_data_consumer, Response)
href='/guix/log/tests?id=d27f072961d166abe21e844c646816304a73d518'>tests/guix-package-aliases.sh
Age | Commit message (Expand) | Author |
2020-10-02 | guix build: Record package transformations in manifest entries....With this change, package transformation options used while building a
manifest are saved in the metadata of the manifest entries.
* guix/scripts/build.scm (transformation-procedure): New procedure.
(options->transformation)[applicable]: Use it. Change to a list of
key/value/proc tuples instead of key/proc pairs.
[package-with-transformation-properties, tagged-object]: New
procedures. Use them.
(package-transformations, manifest-entry-with-transformations): New
procedures.
* guix/scripts/pack.scm (guix-pack)[with-transformations]: New
procedure.
Use it.
* guix/scripts/package.scm (process-actions)[transform-entry]: Use it.
* tests/guix-package-aliases.sh: Add test.
| Ludovic Courtès |
2020-09-28 | tests: Simplify shell exit status negation;...* tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh,
tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment.sh,
tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh,
tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack-relocatable.sh,
tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh,
tests/guix-package.sh: Use the shell '!' keyword to negate command exit status
in place of 'if ...; then false; else true; fi'
| Eric Bavier |
2020-05-11 | tests: Test 'guix show' with multiple packages....* tests/guix-package-aliases.sh: Test 'guix show' with multiple packages.
| Ludovic Courtès |
2019-09-21 | guix package: '--show' ignores deprecated packages....* guix/scripts/package.scm (process-query) <'show>: Remove superseded
packages.
* tests/guix-package-aliases.sh: Add test.
| Ludovic Courtès |
2019-09-21 | guix package: Add 'guix show' alias....* guix/scripts/show.scm: New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Add it.
* tests/guix-package-aliases.sh: Add test.
* doc/guix.texi (Invoking guix package): Document it and use it in a example.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| zimoun |
2019-04-29 | guix package: Add 'guix search' alias....* guix/scripts/search.scm: New file.
* Makefile.am (MODULES): Add it.
* po/guix/POTFILES.in: Add it.
* tests/guix-package-aliases.sh: Add test.
* doc/guix.texi (Invoking guix package): Document it and use it in a
couple of examples.
| Ludovic Courtès |
2019-04-29 | guix package: Add 'install', 'remove', and 'upgrade' aliases....* guix/scripts/install.scm, guix/scripts/remove.scm,
guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files.
* Makefile.am (MODULES, SH_TESTS): Add them.
* po/guix/POTFILES.in: Add them.
* guix/scripts/package.scm (guix-package): Split with...
(guix-package*): ... this. New procedure.
* doc/guix.texi (Invoking guix package): Document them.
(Binary Installation, Application Setup, Package Management)
(Packages with Multiple Outputs, Package Modules)
(X.509 Certificates, Installing Debugging Files): Use 'guix install' in
simple examples.
* etc/completion/bash/guix (_guix_complete): Handle "install", "remove",
and "upgrade".
| Ludovic Courtès |