[med-svn] [Git][med-team/khmer][master] d/patches/nose2pytest: rename setup/teardown methods to Pytest way. Closes: #1063977.

Michael R. Crusoe (@crusoe) gitlab at salsa.debian.org
Sat Feb 17 14:18:40 GMT 2024



Michael R. Crusoe pushed to branch master at Debian Med / khmer


Commits:
65b0fe56 by Michael R. Crusoe at 2024-02-17T12:38:48+01:00
d/patches/nose2pytest: rename setup/teardown methods to Pytest way. Closes: #1063977.

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/nose2pytest
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+khmer (3.0.0~a3+dfsg-8) unstable; urgency=medium
+
+  * d/patches/nose2pytest: rename setup/teardown methods to Pytest way.
+    Closes: #1063977.
+
+ -- Michael R. Crusoe <crusoe at debian.org>  Sat, 17 Feb 2024 12:38:43 +0100
+
 khmer (3.0.0~a3+dfsg-7) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/nose2pytest
=====================================
@@ -0,0 +1,161 @@
+From: Michael R. Crusoe <crusoe at debian.org>
+Subject: Add Pytest 8 compat
+Forwarded: https://github.com/dib-lab/khmer/pull/1923
+
+https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
+
+--- khmer.orig/tests/test_assembly.py
++++ khmer/tests/test_assembly.py
+@@ -54,7 +54,7 @@
+ from .graph_features import K
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 
+--- khmer.orig/tests/test_countgraph.py
++++ khmer/tests/test_countgraph.py
+@@ -62,7 +62,7 @@
+ DNA = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC"
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 
+@@ -116,7 +116,7 @@
+ 
+ class Test_Countgraph(object):
+ 
+-    def setup(self):
++    def setup_method(self):
+         self.hi = khmer.Countgraph(12, 1, 1, primes=PRIMES_1m)
+ 
+     def test_failed_get(self):
+--- khmer.orig/tests/test_counting_single.py
++++ khmer/tests/test_counting_single.py
+@@ -329,7 +329,7 @@
+ 
+ class Test_ConsumeString(object):
+ 
+-    def setup(self):
++    def setup_method(self):
+         self.kh = khmer.Countgraph(4, 1, 1, primes=[4 ** 4])
+ 
+     def test_n_occupied(self):
+@@ -374,7 +374,7 @@
+ 
+ class Test_AbundanceDistribution(object):
+ 
+-    def setup(self):
++    def setup_method(self):
+         self.kh = khmer.Countgraph(4, 100, 1)
+         A_filename = utils.get_test_data('all-A.fa')
+         self.kh.consume_seqfile(A_filename)
+--- khmer.orig/tests/test_cython_parsing.py
++++ khmer/tests/test_cython_parsing.py
+@@ -16,7 +16,7 @@
+ import screed
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 
+--- khmer.orig/tests/test_graph.py
++++ khmer/tests/test_graph.py
+@@ -41,13 +41,13 @@
+ from . import khmer_tst_utils as utils
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 
+ class Test_ExactGraphFu(object):
+ 
+-    def setup(self):
++    def setup_method(self):
+         self.ht = khmer.Nodegraph(12, 1e4, 2)
+ 
+     def test_counts(self):
+@@ -141,7 +141,7 @@
+ 
+ class Test_InexactGraphFu(object):
+ 
+-    def setup(self):
++    def setup_method(self):
+         self.ht = khmer.Nodegraph(12, 4 ** 3 + 1, 2)
+ 
+     def test_graph_links_next_a(self):
+--- khmer.orig/tests/test_hll.py
++++ khmer/tests/test_hll.py
+@@ -50,7 +50,7 @@
+ TRANSLATE = {'A': 'T', 'C': 'G', 'T': 'A', 'G': 'C'}
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 
+--- khmer.orig/tests/test_labelhash.py
++++ khmer/tests/test_labelhash.py
+@@ -44,7 +44,7 @@
+ from . import khmer_tst_utils as utils
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ #
+--- khmer.orig/tests/test_nodegraph.py
++++ khmer/tests/test_nodegraph.py
+@@ -48,7 +48,7 @@
+ from . import khmer_tst_utils as utils
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 
+--- khmer.orig/tests/test_sandbox_scripts.py
++++ khmer/tests/test_sandbox_scripts.py
+@@ -55,7 +55,7 @@
+     return script
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 
+--- khmer.orig/tests/test_scripts.py
++++ khmer/tests/test_scripts.py
+@@ -51,7 +51,7 @@
+ import screed
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 
+--- khmer.orig/tests/test_subset_graph.py
++++ khmer/tests/test_subset_graph.py
+@@ -43,7 +43,7 @@
+ from . import khmer_tst_utils as utils
+ 
+ 
+-def teardown():
++def teardown_module():
+     utils.cleanup()
+ 
+ 


=====================================
debian/patches/series
=====================================
@@ -1,3 +1,4 @@
+nose2pytest
 fix_non_x86_build
 hardening
 update-manifest



View it on GitLab: https://salsa.debian.org/med-team/khmer/-/commit/65b0fe56de6c8adb264f89720000c3a87761719c

-- 
View it on GitLab: https://salsa.debian.org/med-team/khmer/-/commit/65b0fe56de6c8adb264f89720000c3a87761719c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240217/f416ae81/attachment-0001.htm>


More information about the debian-med-commit mailing list