[med-svn] [Git][med-team/mirtop][master] 4 commits: pytest.patch: add; move away from nosetests.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Fri Dec 2 20:19:01 GMT 2022



Étienne Mollier pushed to branch master at Debian Med / mirtop


Commits:
138c5874 by Étienne Mollier at 2022-12-02T21:14:57+01:00
pytest.patch: add; move away from nosetests.

- - - - -
25419fa3 by Étienne Mollier at 2022-12-02T21:16:03+01:00
d/t/control: replace nose by pytest.

- - - - -
37877a36 by Étienne Mollier at 2022-12-02T21:17:47+01:00
d/t/run-unit-test: replace nose by pytest.

- - - - -
5e05f842 by Étienne Mollier at 2022-12-02T21:18:22+01:00
update changelog

- - - - -


5 changed files:

- debian/changelog
- + debian/patches/pytest.patch
- debian/patches/series
- debian/tests/control
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+mirtop (0.4.25-2) UNRELEASED; urgency=medium
+
+  * pytest.patch: add; move away from nosetests.
+  * d/t/control: replace nose by pytest.
+  * d/t/run-unit-test: replace nose by pytest.
+
+ -- Étienne Mollier <emollier at debian.org>  Fri, 02 Dec 2022 21:18:09 +0100
+
 mirtop (0.4.25-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/pytest.patch
=====================================
@@ -0,0 +1,731 @@
+--- mirtop.orig/test/test_automated_analysis.py
++++ mirtop/test/test_automated_analysis.py
+@@ -10,8 +10,7 @@
+ import contextlib
+ import functools
+ 
+-from nose import SkipTest
+-from nose.plugins.attrib import attr
++import pytest
+ 
+ 
+ @contextlib.contextmanager
+@@ -39,7 +38,7 @@
+         try:
+             test(*args, **kwargs)
+         except Exception:
+-            raise SkipTest
++            pytest.skip()
+         else:
+             raise AssertionError('Failure expected')
+     return inner
+@@ -49,7 +48,7 @@
+     """Setup a full automated analysis and run the pipeline.
+     """
+ 
+-    def setUp(self):
++    def setup(self):
+         self.data_dir = os.path.join(os.path.dirname(__file__), "data", "automated")
+ 
+     def _install_test_files(self, data_dir):
+@@ -66,7 +65,7 @@
+         shutil.move(os.path.basename(dirname), dirname)
+         os.remove(os.path.basename(url))
+ 
+-    @attr(simulate=True)
++    @pytest.mark.parametrize("simulate", True)
+     def test_simulate(self):
+         """Check simulated data"""
+         mirna = "TGAGGTAGTAGGTTGTATAGTT"
+@@ -102,10 +101,8 @@
+                 n += 1
+         print("rate %s/%s" % (correct, n))
+ 
+-    @attr(complete=True)
+-    @attr(annotate=True)
+-    @attr(bam=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,annotate,bam,cmd",
++                             [True, True, True, True])
+     def test_srnaseq_annotation_bam(self):
+         """Run miraligner analysis
+         """
+@@ -121,9 +118,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(low_memory=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,low_memory,cmd", [True, True, True])
+     def test_srnaseq_annotation_bam_chunk(self):
+         """Run miraligner analysis
+         """
+@@ -139,9 +134,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(cmd_bam_genomic=True)
+-    @attr(complete=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("cmd_bam_genomic,complete,cmd", [True, True, True])
+     def test_srnaseq_annotation_genomic_bam(self):
+         """Run genomic bam analysis
+         """
+@@ -157,9 +150,8 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(cmd_bam_genomic_low_memory=True)
+-    @attr(complete=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("cmd_bam_genomic_low_memory,complete,cmd",
++                             [True, True, True])
+     def test_srnaseq_annotation_genomic_bam_low_memory(self):
+         """Run genomic bam analysis
+         """
+@@ -175,9 +167,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_seqbuster=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_seqbuster,cmd", [True, True, True])
+     def test_srnaseq_annotation_seqbuster(self):
+         """Run miraligner analysis
+         """
+@@ -194,9 +184,8 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_seqbuster_low_memory=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_seqbuster_low_memroy,cmd",
++                             [True, True, True])
+     def test_srnaseq_annotation_seqbuster_low_memory(self):
+         """Run miraligner analysis
+         """
+@@ -213,9 +202,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_isomirsea=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_isoirsea,cmd", [True, True, True])
+     def test_srnaseq_annotation_isomirsea(self):
+         """Run isomirsea analysis
+         """
+@@ -233,9 +220,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_srnabench=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_srnabench,cmd", [True, True, True])
+     def test_srnaseq_annotation_srnabench(self):
+         """Run srnabench analysis
+         """
+@@ -253,9 +238,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_optimir=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_optimir,cmd", [True, True, True])
+     def test_srnaseq_annotation_optimir(self):
+         """Run optimir analysis
+         """
+@@ -273,9 +256,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_manatee=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_manatee,cmd", [True, True, True])
+     def test_srnaseq_annotation_manatee(self):
+         """Run Manatee analysis
+         """
+@@ -293,9 +274,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_stats=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_stats,cmd", [True, True, True])
+     def test_srnaseq_stats(self):
+         """Run stats analysis
+         """
+@@ -312,9 +291,7 @@
+             if sum(1 for line in open('test_out_mirs/mirtop_stats.txt')) == 1:
+                 raise ValueError("File is empty, something is wrong with stats cmd.")
+ 
+-    @attr(complete=True)
+-    @attr(cmd_merge=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_merge,cmd", [True, True, True])
+     def test_merge_bam(self):
+         """
+         Run collapse two samples
+@@ -332,9 +309,8 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_export_seqbuster=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_export_seqbuster,cmd",
++                             [True, True, True])
+     def test_export_seqbuster(self):
+         """
+         Run SEQBUSTER export command
+@@ -350,9 +326,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_export_vcf=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_export_vcf,cmd", [True, True, True])
+     def test_export_vcf(self):
+         """
+         Run VCF export command
+@@ -370,9 +344,8 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_export_fasta=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_export_fasta,cmd",
++                             [True, True, True])
+     def test_export_fasta(self):
+         """
+         Run FASTA export command
+@@ -390,9 +363,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_count=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_count,cmd", [True, True, True])
+     def test_count(self):
+         """
+         Run count command
+@@ -408,9 +379,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_spikeins=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_spikeins,cmd", [True, True, True])
+     def test_spikeins_cmd(self):
+         """Run spikeins analysis
+         """
+@@ -448,9 +417,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_update=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_update,cmd", [True, True, True])
+     def test_update_cmd(self):
+         """Run update analysis
+         """
+@@ -463,9 +430,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_validate_cmd(self):
+         """Run update analysis
+         """
+@@ -478,9 +443,7 @@
+             subprocess.check_call(clcode)
+ 
+ 
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_create_1_cmd(self):
+         """Run sql command to incorporate GFF to SQLite
+         """
+@@ -499,9 +462,7 @@
+             subprocess.check_call(clcode)
+ 
+ 
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_create_2_cmd(self):
+         """Run sql command to incorporate GFF to SQLite
+         """
+@@ -517,9 +478,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+ 
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_showTables_cmd(self):
+         """Run sql command to query from a database to show tables using SQLite
+         """
+@@ -535,9 +494,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_showSchema_cmd(self):
+         """Run sql command to query from a database to show schema using SQLite
+         """
+@@ -555,9 +512,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_showColumns_cmd(self):
+         """Run sql command to query from a database to show columns using SQLite
+         """
+@@ -573,9 +528,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_descSummary_cmd(self):
+         """Run sql command to query from a database to display the header of the GFF using SQLite
+         """
+@@ -591,9 +544,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_statIsomirs_cmd(self):
+         """Run sql command to query from a database to summarize isomirs per miRNA 
+         """
+@@ -611,9 +562,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_statIsomirsFile_cmd(self):
+         """Run sql command to query from a database to summarize isomirs per miRNA reading from afile
+         """
+@@ -631,9 +580,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_SelectLimit_cmd(self):
+         """Run sql command to query from database using limit option
+         """
+@@ -651,9 +598,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_SelectColumns_cmd(self):
+         """Run sql command to query from database using limit option
+         """
+@@ -673,9 +618,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_SelectMirna_cmd(self):
+         """Run sql command to query from database for specific miRNAs 
+         """
+@@ -697,9 +640,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_SelectiVariant_cmd(self):
+         """Run sql command to query from database for specific variant types  
+         """
+@@ -719,9 +660,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_SelectFilter_cmd(self):
+         """Run sql command to query from database using filters 
+         """
+@@ -743,9 +682,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_SelectCount_cmd(self):
+         """Run sql command to query from database to fetch counts of the return values  
+         """
+@@ -763,9 +700,7 @@
+             print(" ".join(clcode))
+             subprocess.check_call(clcode)
+     
+-    @attr(complete=True)
+-    @attr(cmd_validate=True)
+-    @attr(cmd=True)
++    @pytest.mark.parametrize("complete,cmd_validate,cmd", [True, True, True])
+     def test_sql_query_SelectTextOut_cmd(self):
+         """Run sql command to query from database and return the output to a text file  
+         """
+--- mirtop.orig/test/test_functions.py
++++ mirtop/test/test_functions.py
+@@ -9,8 +9,7 @@
+ import argparse
+ import contextlib
+ import shutil
+-
+-from nose.plugins.attrib import attr
++import pytest
+ 
+ 
+ @contextlib.contextmanager
+@@ -64,7 +63,7 @@
+ class FunctionsTest(unittest.TestCase):
+     """Setup a full automated analysis and run the pipeline.
+     """
+-    @attr(database=True)
++    @pytest.mark.parametrize("database", True)
+     def test_database(self):
+         from mirtop.mirna import mapper
+         args = argparse.Namespace()
+@@ -75,7 +74,7 @@
+         if db != "miRBasev21":
+             raise ValueError("%s not eq to miRBasev21" % db)
+ 
+-    @attr(read_hairpin=True)
++    @pytest.mark.parametrize("read_hairpin", True)
+     def test_read_hairpin(self):
+         from mirtop.mirna import mapper, fasta
+         from mirtop.libs import logger
+@@ -96,7 +95,7 @@
+         # read data/aligments/let7-perfect.bam
+         return True
+ 
+-    @attr(read_hairpin_mirgenedb=True)
++    @pytest.mark.parametrize("read_hairpin_mirgenedb", True)
+     def test_read_hairpin_mirgenedb(self):
+         from mirtop.mirna import mapper
+         from mirtop.libs import logger
+@@ -105,7 +104,7 @@
+             "data/db/mirgenedb/hsa.gff")
+         print(map_mir)
+ 
+-    @attr(read_mir2chr=True)
++    @pytest.mark.parametrize("read_mir2chr", True)
+     def test_read_mir2chr(self):
+         from mirtop.mirna import mapper
+         from mirtop.libs import logger
+@@ -114,7 +113,7 @@
+         print(map_mir)
+         # print(mapper.read_gtf_chr2mirna2("data/examples/annotate/hsa.gff3"))
+ 
+-    @attr(read_mir2genomic=True)
++    @pytest.mark.parametrize("read_mir2genomic", True)
+     def test_read_mir2genomic(self):
+         from mirtop.mirna import mapper
+         from mirtop.libs import logger
+@@ -122,7 +121,7 @@
+         map_mir = mapper.read_gtf_to_mirna("data/examples/annotate/hsa.gff3")
+         print(map_mir)
+ 
+-    @attr(read_line=True)
++    @pytest.mark.parametrize("read_line", True)
+     def test_read_line(self):
+         """Read GFF/GTF line"""
+         from mirtop.gff.body import read_gff_line
+@@ -130,7 +129,7 @@
+             for line in inh:
+                 print(read_gff_line(line))
+ 
+-    @attr(code=True)
++    @pytest.mark.parametrize("code", True)
+     def test_code(self):
+         """testing code correction function"""
+         from mirtop.mirna.realign import make_id, read_id
+@@ -153,7 +152,7 @@
+         # if read_id("asD(-"):
+         #     raise ValueError("This should be False, Not valid code.")
+ 
+-    @attr(code_convert=True)
++    @pytest.mark.parametrize("code_convert", True)
+     def test_code_convert(self):
+         """testing code correction function"""
+         from mirtop.mirna.realign import make_id
+@@ -164,7 +163,7 @@
+         if not make_id(read_uid_10("@#%$@2")) == "iso-13-B1NYDX":
+             raise ValueError("Update ID is not working.")
+ 
+-    @attr(cigar=True)
++    @pytest.mark.parametrize("cigar", True)
+     def test_cigar(self):
+         """testing cigar correction function"""
+         cigar = [[0, 14], [1, 1], [0, 5]]
+@@ -188,7 +187,7 @@
+             raise ValueError("3MA3M not equal AAATCCC but %s" %
+                              cigar2snp("3MA3M", "AAATCCC"))
+ 
+-    @attr(sequence=True)
++    @pytest.mark.parametrize("sequence", True)
+     def test_is_sequence(self):
+         """testing if string is valid sequence"""
+         from mirtop.mirna.realign import is_sequence
+@@ -197,7 +196,7 @@
+         if is_sequence("AC2TGC"):
+             raise ValueError("AC2TGC should return false.")
+ 
+-    @attr(locala=True)
++    @pytest.mark.parametrize("locala", True)
+     def test_locala(self):
+         """testing pairwise alignment"""
+         from mirtop.mirna.realign import align
+@@ -209,7 +208,7 @@
+         print(align("TGANTAGTNGNTTGTATNGTT", "TGAGTATAGGCCTTGTATAGTT")[0])
+         print(align("NCANAGTCCAAGNTCATN", "TCATAGTCCAAGGTCATG")[0])
+ 
+-    @attr(reverse=True)
++    @pytest.mark.parametrize("reverse", True)
+     def test_reverse(self):
+         """Test reverse complement function"""
+         from mirtop.mirna.realign import reverse_complement
+@@ -218,7 +217,7 @@
+             raise ValueError("ATGC complement is not: %s" %
+                              reverse_complement("ATGC"))
+ 
+-    @attr(class_gff=True)
++    @pytest.mark.parametrize("class_gff", True)
+     def test_class(self):
+         """Test class to read GFF line"""
+         from mirtop.gff.classgff import feature
+@@ -231,7 +230,7 @@
+         print(gff.columns)
+         print(gff.attributes)
+ 
+-    @attr(merge=True)
++    @pytest.mark.parametrize("merge", True)
+     def test_merge(self):
+         """Test merge functions"""
+         from mirtop.gff import merge
+@@ -250,7 +249,7 @@
+         if expression != "1,2":
+             raise ValueError("This is wrong: %s" % expression)
+ 
+-    @attr(align_mature=True)
++    @pytest.mark.parametrize("align_mature", True)
+     def test_variant(self):
+         """testing get mature sequence"""
+         from mirtop.mirna import fasta, mapper
+@@ -315,7 +314,7 @@
+             raise ValueError("Wrong alignment for test 8 %s" % res)
+         
+ 
+-    @attr(alignment=True)
++    @pytest.mark.parametrize("alignment", True)
+     def test_alignment(self):
+         """testing alignments function"""
+         from mirtop.bam import bam
+@@ -334,7 +333,7 @@
+                 if not set(f.attributes['Variant'].split(",")) == set(fns[fn][pos].split(",")):
+                     raise ValueError("Error in %s" % fn)
+    
+-    @attr(alignment_genomic=True)
++    @pytest.mark.parametrize("alignment_genomic", True)
+     def test_alignment_genomic(self):
+         """testing alignments function"""
+         from mirtop.bam import bam
+@@ -351,7 +350,7 @@
+                                bam.read_bam,
+                                gtf="data/db/mirbase/hsa.gff3", genomic=True))
+ 
+-    @attr(keep_name=True)
++    @pytest.mark.parametrize("keep_name", True)
+     def test_keep_name(self):
+         from mirtop.bam import bam
+         line = annotate("data/aligments/let7-perfect.sam",
+@@ -361,7 +360,7 @@
+         if line["hsa-let-7a-1"][5][0][4].find("seq_perfect_x2") < 0:
+             raise ValueError("Keep name failed: %s" % line)
+ 
+-    @attr(seqbuster=True)
++    @pytest.mark.parametrize("seqbuster", True)
+     def test_seqbuster(self):
+         """testing reading seqbuster files function"""
+         from mirtop.libs import logger
+@@ -375,7 +374,7 @@
+         print("\nno frequency\n")
+         annotate("data/examples/seqbuster/seqbuster_nofreq.mirna", seqbuster.read_file)
+ 
+-    @attr(srnabench=True)
++    @pytest.mark.parametrize("srnabench", True)
+     def test_srnabench(self):
+         """testing reading srnabench files function"""
+         from mirtop.libs import logger
+@@ -384,7 +383,7 @@
+         from mirtop.importer import srnabench
+         annotate("data/examples/srnabench", srnabench.read_file, create=False)
+ 
+-    @attr(optimir=True)
++    @pytest.mark.parametrize("optimir", True)
+     def test_optimir(self):
+         """testing reading optimir files function"""
+         from mirtop.libs import logger
+@@ -393,7 +392,7 @@
+         from mirtop.importer import optimir
+         annotate("data/examples/optimir/synthetic_100_full.gff3", optimir.read_file, create=False)
+ 
+-    @attr(prost=True)
++    @pytest.mark.parametrize("prost", True)
+     def test_prost(self):
+         """testing reading prost files function"""
+         from mirtop.libs import logger
+@@ -408,7 +407,7 @@
+             fn, precursors, "miRBasev21", "data/examples/annotate/hsa.gff3")
+         annotate("data/example/prost/prost.example.txt", reads, True)
+ 
+-    @attr(gff=True)
++    @pytest.mark.parametrize("gff", True)
+     def test_gff(self):
+         """testing GFF function"""
+         from mirtop.libs import logger
+@@ -419,7 +418,7 @@
+         annotate(bam_fn, bam.read_bam)
+         return True
+ 
+-    @attr(collapse=True)
++    @pytest.mark.parametrize("collapse", True)
+     def test_collapse(self):
+         """testing GFF function"""
+         from mirtop.libs import logger
+@@ -430,7 +429,7 @@
+         annotate(bam_fn, bam.read_bam)
+         return True
+ 
+-    @attr(counts=True)
++    @pytest.mark.parametrize("counts", True)
+     def test_counts(self):
+         """testing convert_gff_counts in convert.py function"""
+         from mirtop.libs import logger
+@@ -452,7 +451,7 @@
+ 
+         return True
+ 
+-    @attr(stats=True)
++    @pytest.mark.parametrize("stats", True)
+     def test_stats(self):
+         """testing stats function"""
+         from mirtop.gff import stats
+@@ -461,7 +460,7 @@
+         stats._dump_log(df, version, None)
+         print(df)
+ 
+-    @attr(variant=True)
++    @pytest.mark.parametrize("variant", True)
+     def test_string_variant(self):
+         """testing parsing string variants"""
+         from mirtop.gff import body
+@@ -477,7 +476,7 @@
+         if (truthv > list(gff.values())) - (list(gff.values()) > truthv):
+             raise ValueError("Not found expected Values.")
+ 
+-    @attr(validate=True)
++    @pytest.mark.parametrize("validate", True)
+     def test_validator(self):
+         """test validator functions"""
+         from mirtop.gff.validator import _check_file
+@@ -493,7 +492,7 @@
+             raise ValueError("Validator did catch an unexpected error in correct_file.gff.") 
+ 
+ 
+-    @attr(spikeins=True)
++    @pytest.mark.parametrize("spikeins", True)
+     def test_spikeins(self):
+         """Test spikeins reading and annotation"""
+         from mirtop.libs import spikeins
+@@ -519,19 +518,19 @@
+         fasta_precursor = fasta.read_precursor(file_fasta, None)
+         print(fasta_precursor)
+ 
+-    @attr(export_fasta=True)
++    @pytest.mark.parametrize("export_fasta", True)
+     def test_export_fasta(self):
+         from mirtop.exporter.fasta import _process
+         print("\n")
+         _process("data/examples/gff/2samples.gff", None)
+ 
+-    @attr(update=True)
++    @pytest.mark.parametrize("update", True)
+     def test_update(self):
+         from mirtop.gff.update import update_file
+         print("\n")
+         update_file("data/examples/versions/version1.0.gff", None)
+ 
+-    @attr(sql=True)
++    @pytest.mark.parametrize("sql", True)
+     def test_sql(self):
+         """testing mirtop_sql in sql.py function"""
+         from mirtop.libs import logger
+@@ -548,13 +547,13 @@
+         os.remove(os.path.join(args.out, "SQL_sample.db"))
+         return True
+ 
+-    @attr(issue64=True)
++    @pytest.mark.parametrize("issue64", True)
+     def test_issue64(self):
+         from mirtop.bam.filter import tune
+         subs, add, cigar = tune("TATCACAGTGGCTGTTCTTTTTT", "CCCCCTATCACAGTGGCTGTTCTTTTTT", 5, None)
+         if add:
+             raise ValueError("Bad annotation in for seqs with 6T/As at the end")
+-    @attr(error69=True)
++    @pytest.mark.parametrize("error69", True)
+     def test_error69(self):
+         from mirtop.bam.filter import tune
+         v = tune("CTTATCAGATTGTATTGTAATT", 


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 spelling
 fix-circular-import.patch
+pytest.patch


=====================================
debian/tests/control
=====================================
@@ -1,3 +1,3 @@
 Tests: run-unit-test
-Depends: @, python3-all, python3-nose, samtools, bedtools, seqan-apps
+Depends: @, python3-all, python3-pytest, samtools, bedtools, seqan-apps
 Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -15,6 +15,6 @@ cd $AUTOPKGTEST_TMP
 for py in $(py3versions -s 2> /dev/null)
 do
     echo "Testing with $py in $(pwd):"
-    nosetests3 -v
+    pytest-3 -v
     
 done



View it on GitLab: https://salsa.debian.org/med-team/mirtop/-/compare/a94be3ec19d66754437cd437bb99f0df7c280f3c...5e05f8424de4542301c61cfb02b9f2bbd510a72d

-- 
View it on GitLab: https://salsa.debian.org/med-team/mirtop/-/compare/a94be3ec19d66754437cd437bb99f0df7c280f3c...5e05f8424de4542301c61cfb02b9f2bbd510a72d
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/20221202/40b74f08/attachment-0001.htm>


More information about the debian-med-commit mailing list