Fix regex so that it works with Python 3.6. See . Copied from upstream bug report: https://bugs.launchpad.net/python-mox3/+bug/1665266 From 05064cdb6ea7a16450c6beae2b6f7c6074212a69 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 16 Feb 2017 00:24:10 -0800 Subject: [PATCH] RegexTest: python3.6 compatibility These fixes are backward-compatible with older python versions: * raw strings fix invalid escape sequences * flags=8 fixes ValueError: cannot use LOCALE flag with a str pattern --- mox3/tests/test_mox.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mox3/tests/test_mox.py b/mox3/tests/test_mox.py index 15ac565..3a1af17 100644 --- a/mox3/tests/test_mox.py +++ b/mox3/tests/test_mox.py @@ -312,12 +312,12 @@ class RegexTest(testtools.TestCase): def testReprWithoutFlags(self): """repr should return the regular expression pattern.""" self.assertTrue( - repr(mox.Regex(r"a\s+b")) == "") + repr(mox.Regex(r"a\s+b")) == r"") def testReprWithFlags(self): """repr should return the regular expression pattern and flags.""" - self.assertTrue(repr(mox.Regex(r"a\s+b", flags=4)) == - "") + self.assertTrue(repr(mox.Regex(r"a\s+b", flags=8)) == + r"") class IsTest(testtools.TestCase): -- 2.10.2 hidden' name='id' value='49fa48eed78c50d9674e9868e5a2b3e029a6e403'/>
/div>
AgeCommit message (Expand)Author
AgeCommit message (Collapse)Author
2023-04-21tests: Fix checks for expected failures.Eric Bavier
Addresses <https://issues.guix.gnu.org/62406>. With 'set -e', a return status inverted with '!' does not cause the shell to exit immediately. Instead use '&& false' to indicate an expected failure. * tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment-container.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-home.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh, tests/guix-refresh.sh, tests/guix-shell.sh, tests/guix-style.sh, tests/guix-system.sh: Replace uses of '! ...' with '... && false' or `test ! ...` as appropriate. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-22Remove now unnecessary uses of (guix grafts).Ludovic Courtès
These modules would use (guix grafts) just to access '%graft?' and related bindings, which are now in (guix store). * gnu/ci.scm, guix/gexp.scm, guix/lint.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/deploy.scm, guix/scripts/environment.scm, guix/scripts/home.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/pull.scm, guix/scripts/size.scm, guix/scripts/system.scm, guix/scripts/weather.scm, tests/builders.scm, tests/channels.scm, tests/cpan.scm, tests/derivations.scm, tests/gexp.scm, tests/graph.scm, tests/guix-daemon.sh, tests/monads.scm, tests/pack.scm, tests/packages.scm, tests/profiles.scm, tests/system.scm: Remove #:use-module (guix grafts).