diff --git a/tests/test b/tests/test new file mode 100644 index 00000000..8f9e4be5 --- /dev/null +++ b/tests/test @@ -0,0 +1 @@ +䔀 blah blah blah diff --git a/tests/test_amplify.py b/tests/test_amplify.py index eb3ba462..5feca34a 100644 --- a/tests/test_amplify.py +++ b/tests/test_amplify.py @@ -271,4 +271,4 @@ def test_pcr(): assert tst[0] == seguid(pcr(tst[1:]).seq) if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_assemble_MX4blaster12.py b/tests/test_assemble_MX4blaster12.py index 1375c8bb..78456697 100644 --- a/tests/test_assemble_MX4blaster12.py +++ b/tests/test_assemble_MX4blaster12.py @@ -137,4 +137,4 @@ def test_MXblaster1(): if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_assemble_YEp24PGK_XK.py b/tests/test_assemble_YEp24PGK_XK.py index 5fc09437..0259264b 100644 --- a/tests/test_assemble_YEp24PGK_XK.py +++ b/tests/test_assemble_YEp24PGK_XK.py @@ -38,7 +38,7 @@ def test_empty(): assert pydna.eq(YEp24PGK_XK, YEp24PGK_XK_correct) if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_assemble_pGUP1.py b/tests/test_assemble_pGUP1.py index 81148f8e..630de582 100644 --- a/tests/test_assemble_pGUP1.py +++ b/tests/test_assemble_pGUP1.py @@ -36,4 +36,4 @@ def test_empty(): assert pGUP1.seguid() == "42wIByERn2kSe_Exn405RYwhffU" if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_assembly.py b/tests/test_assembly.py index 0f42239a..a786c32d 100644 --- a/tests/test_assembly.py +++ b/tests/test_assembly.py @@ -136,7 +136,7 @@ def test_assembly(): print("done!", time.time()-start) if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_cut_features.py b/tests/test_cut_features.py index 3c9e4b68..92f717ad 100644 --- a/tests/test_cut_features.py +++ b/tests/test_cut_features.py @@ -27,4 +27,4 @@ def amplicon_to_dseqrecord(a): assert len(pcrProdDseqrecord.cut(EcoRI)[1].features) == 17 if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_download.py b/tests/test_download.py index 97048748..0968eed1 100644 --- a/tests/test_download.py +++ b/tests/test_download.py @@ -37,7 +37,7 @@ def test_pydna_download(): os.environ["pydna_cache"] = cachevar if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_dsdna.py b/tests/test_dsdna.py index b737fa3e..00576b88 100644 --- a/tests/test_dsdna.py +++ b/tests/test_dsdna.py @@ -875,5 +875,5 @@ def test_synced2(): print() if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_genbankfixer.py b/tests/test_genbankfixer.py index 0922d1b8..55ff64cd 100644 --- a/tests/test_genbankfixer.py +++ b/tests/test_genbankfixer.py @@ -26,4 +26,4 @@ def test_pydna_gbtext_clean(): #print('"'+calcseg+'"),') if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_import_ipynb.py b/tests/test_import_ipynb.py index d2c141bc..942e1c37 100644 --- a/tests/test_import_ipynb.py +++ b/tests/test_import_ipynb.py @@ -22,4 +22,4 @@ def test_ipynb_import(): assert mynotebook.foo() == "bar" if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_map_reads.py b/tests/test_map_reads.py index a2663592..8804b538 100644 --- a/tests/test_map_reads.py +++ b/tests/test_map_reads.py @@ -95,5 +95,5 @@ def test_map2(): if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_markbudde.py b/tests/test_markbudde.py index b51761b3..e4188470 100644 --- a/tests/test_markbudde.py +++ b/tests/test_markbudde.py @@ -33,4 +33,4 @@ def test_empty(): """ if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_parse.py b/tests/test_parse.py index 67c50085..9297f100 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -115,7 +115,7 @@ def test_parse2(): if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_pretty.py b/tests/test_pretty.py index 1b5be46d..4fba15b1 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -9,13 +9,15 @@ def test_pretty(): - x= u'/label="2micron 2µ"' + print(sys.getdefaultencoding()) + import locale + print(locale.getpreferredencoding()) import io from Bio import SeqIO from Bio.Alphabet.IUPAC import IUPACAmbiguousDNA - raw = open("pydna_read_test.txt", 'r').read() + raw = open("pydna_read_test.txt", 'r', encoding="UTF8").read() handle = io.StringIO(raw) @@ -23,13 +25,13 @@ def test_pretty(): s = sr.format("gb").strip() - assert s[559:578] == x + assert s[559:578] == '/label="2micron 2µ"' y = pydna._pretty.pretty_string( s[:55]+"circular"+s[63:] )[559:578] - assert x==y + assert '/label="2micron 2µ"'==y - assert pydna.read("pydna_read_test.txt").format("gb")[559:578] == x + assert pydna.read("pydna_read_test.txt").format("gb")[559:578] == '/label="2micron 2µ"' if __name__ == '__main__': pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_primer_design.py b/tests/test_primer_design.py index 9a584e91..9ea92b9b 100644 --- a/tests/test_primer_design.py +++ b/tests/test_primer_design.py @@ -219,4 +219,4 @@ def test_primer_Design_saving_to_text_file(): assert r.description == "rv64 t-sequence" if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"]) diff --git a/tests/test_utils.py b/tests/test_utils.py index 1fb149bc..66a76f9b 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -153,4 +153,4 @@ def test_cseguid(): if __name__ == '__main__': - nose.runmodule(argv=[sys.argv[0], '--nocapture']) + pytest.cmdline.main([__file__, "-v", "-s"])