public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: app-text/lizard/files/, app-text/lizard/
@ 2024-04-15 11:59 David Roman
  0 siblings, 0 replies; only message in thread
From: David Roman @ 2024-04-15 11:59 UTC (permalink / raw
  To: gentoo-commits

commit:     62eac930d9029a343ad9f39bb147a9fb5cf6ef8f
Author:     David Roman <davidroman96 <AT> gmail <DOT> com>
AuthorDate: Mon Apr 15 11:58:58 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Mon Apr 15 11:59:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=62eac930

app-text/lizard: fix py3.12 tests

Closes: https://bugs.gentoo.org/927725
Signed-off-by: David Roman <davidroman96 <AT> gmail.com>

 app-text/lizard/files/lizard-1.17.10-py3.12.patch | 45 +++++++++++++++++++++++
 app-text/lizard/lizard-1.17.10-r1.ebuild          |  4 +-
 2 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/app-text/lizard/files/lizard-1.17.10-py3.12.patch b/app-text/lizard/files/lizard-1.17.10-py3.12.patch
new file mode 100644
index 0000000000..f150f74f8e
--- /dev/null
+++ b/app-text/lizard/files/lizard-1.17.10-py3.12.patch
@@ -0,0 +1,45 @@
+From f44f7969c592ecbc1752827cb27dd44e79e1e75e Mon Sep 17 00:00:00 2001
+From: David Roman <droman@ifae.es>
+Date: Thu, 27 Jul 2023 15:07:51 +0200
+Subject: [PATCH] replace deprecated assertRegexpMatches -> assertRegex
+
+Close: #374
+---
+ test/testOutputCSV.py  | 4 ++--
+ test/testOutputHTML.py | 3 +--
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/test/testOutputCSV.py b/test/testOutputCSV.py
+index 78cb221..4d10217 100644
+--- a/test/testOutputCSV.py
++++ b/test/testOutputCSV.py
+@@ -22,7 +22,7 @@ def test_csv_header(self):
+         options_mock.verbose = True
+         options_mock.extensions = []
+         csv_output(AllResult([self.fileSummary]), options_mock)
+-        self.assertRegexpMatches(sys.stdout.stream,
++        self.assertRegex(sys.stdout.stream,
+                                  r"NLOC,CCN,token,PARAM,length,location,file,function,long_name,start,end")
+ 
+     def test_csv_header_with_extension(self):
+@@ -35,7 +35,7 @@ def test_csv_header_with_extension(self):
+         results = AllResult([self.fileSummary])
+         results.result[0].function_list[0].exit_count = 1
+         csv_output(results, options_mock)
+-        self.assertRegexpMatches(sys.stdout.stream,
++        self.assertRegex(sys.stdout.stream,
+                                  r"NLOC,CCN,token,PARAM,length,location,file,function,long_name,start,end,exits")
+ 
+     def test_csv_no_header(self):
+diff --git a/test/testOutputHTML.py b/test/testOutputHTML.py
+index f91156b..81965fc 100644
+--- a/test/testOutputHTML.py
++++ b/test/testOutputHTML.py
+@@ -17,6 +17,5 @@ def setUp(self):
+ 
+     def test_should_have_html_body(self):
+         html_output([self.fileSummary], self.option, None, AllResult)
+-        self.assertRegexpMatches(sys.stdout.stream,
+-                                 r"\<html\>")
++        self.assertRegex(sys.stdout.stream, r"\<html\>")
+ 

diff --git a/app-text/lizard/lizard-1.17.10-r1.ebuild b/app-text/lizard/lizard-1.17.10-r1.ebuild
index 20e6432fa3..c562054a2d 100644
--- a/app-text/lizard/lizard-1.17.10-r1.ebuild
+++ b/app-text/lizard/lizard-1.17.10-r1.ebuild
@@ -12,9 +12,9 @@ DESCRIPTION="A simple code complexity analyser, supports most of the popular lan
 HOMEPAGE="http://www.lizard.ws/"
 SRC_URI="https://github.com/terryyin/lizard/archive/${PV}.tar.gz -> ${P}.tar.gz"
 
-KEYWORDS="~amd64"
 LICENSE="MIT"
 SLOT="0"
+KEYWORDS="~amd64"
 
 DEPEND="
 	test? (
@@ -23,6 +23,6 @@ DEPEND="
 	)
 "
 
-PATCHES=( "${FILESDIR}/${P}-py3.11.patch" )
+PATCHES=( "${FILESDIR}/${P}-py3.11.patch" "${FILESDIR}/${P}-py3.12.patch" )
 
 distutils_enable_tests pytest


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-15 11:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-15 11:59 [gentoo-commits] repo/proj/guru:dev commit in: app-text/lizard/files/, app-text/lizard/ David Roman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox