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)
sts/style.scm?id=952963aba8db1a052fd86920d95be16ad56de187'>style.scm
Age | Commit message (Expand) | Author |
formatted-message' instead of '&message' where appropriate....* gnu.scm (%try-use-modules): Use 'formatted-message' instead of
'&message'.
* gnu/machine/digital-ocean.scm (maybe-raise-unsupported-configuration-error):
Likewise.
* gnu/machine/ssh.scm (machine-check-file-system-availability): Likewise.
(machine-check-building-for-appropriate-system): Likewise.
(deploy-managed-host): Likewise.
(maybe-raise-unsupported-configuration-error): Likewise.
* gnu/packages.scm (search-patch): Likewise.
* gnu/services.scm (%service-with-default-value): Likewise.
(files->etc-directory): Likewise.
(fold-services): Likewise.
* gnu/system.scm (locale-name->definition*): Likewise.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Likewise.
(check-luks-device): Likewise.
* guix/channels.scm (latest-channel-instance): Likewise.
* guix/cve.scm (json->cve-items): Likewise.
* guix/git-authenticate.scm (commit-signing-key): Likewise.
(commit-authorized-keys): Likewise.
(authenticate-commit): Likewise.
(verify-introductory-commit): Likewise.
* guix/remote.scm (remote-pipe-for-gexp): Likewise.
* guix/scripts/graph.scm (assert-package): Likewise.
* guix/scripts/offload.scm (private-key-from-file*): Likewise.
* guix/ssh.scm (authenticate-server*): Likewise.
(open-ssh-session): Likewise.
(remote-inferior): Likewise.
* guix/ui.scm (matching-generations): Likewise.
* guix/upstream.scm (package-update): Likewise.
* tests/channels.scm ("latest-channel-instances, missing introduction for 'guix'"):
Catch 'formatted-message?'.
("authenticate-channel, wrong first commit signer"): Likewise.
* tests/lint.scm ("patches: not found"): Adjust message string.
* tests/packages.scm ("patch not found yields a run-time error"): Catch
'formatted-message?'.
* guix/lint.scm (check-patch-file-names): Handle 'formatted-message?'.
(check-derivation): Ditto.
Ludovic Courtès |
2020-07-25 | utils: Move '&fix-hint' to (guix diagnostics)....* guix/utils.scm (&fix-hint): Move to...
* guix/diagnostics.scm (&fix-hint): ... here.
* gnu.scm: Adjust imports accordingly.
* gnu/system/mapped-devices.scm: Likewise.
* guix/channels.scm: Likewise.
* guix/profiles.scm: Likewise.
* guix/scripts/system/reconfigure.scm: Likewise.
* guix/ssh.scm: Likewise.
| Ludovic Courtès |
2020-07-25 | utils: Move <location> and '&error-location' to (guix diagnostics)....* guix/utils.scm (<location>, source-properties->location)
(location->source-properties, &error-location): Move to...
* guix/diagnostics.scm: ... here.
* gnu.scm: Adjust imports accordingly.
* gnu/machine.scm: Likewise.
* gnu/system.scm: Likewise.
* gnu/tests.scm: Likewise.
* guix/inferior.scm: Likewise.
* tests/channels.scm: Likewise.
* tests/packages.scm: Likewise.
| Ludovic Courtès |
2019-03-24 | Add (gnu system keyboard)....* gnu/system/keyboard.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu.scm (%public-modules): Add it.
| Ludovic Courtès |