From 4ddccd6fbd943de4e7affa69574fc7138d3f8395 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Mon, 12 Sep 2022 11:47:49 -0700 Subject: [PATCH] no cover the test code and a few other places... --- ui/medashare/btv/bencode.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/medashare/btv/bencode.py b/ui/medashare/btv/bencode.py index 70d24ff..0fc96c4 100644 --- a/ui/medashare/btv/bencode.py +++ b/ui/medashare/btv/bencode.py @@ -106,7 +106,7 @@ def bdecode(x, sloppy = 0): raise ValueError("bad bencoded data") return r -def test_bdecode(): +def test_bdecode(): # pragma: no cover try: bdecode(b'0:0:') assert 0 @@ -327,7 +327,7 @@ def test_bencode(): assert bencode({}) == b'de' assert bencode({'age': 25, 'eyes': 'blue'}) == b'd3:agei25e4:eyes4:bluee' assert bencode({'spam.mp3': {'author': 'Alice', 'length': 100000}}) == b'd8:spam.mp3d6:author5:Alice6:lengthi100000eee' - try: + try: # pragma: no cover bencode({1: 'foo'}) assert 0 except (ValueError, AssertionError): @@ -342,7 +342,7 @@ class _TestCases(unittest.TestCase): def test_bdecode(self): test_bdecode() -try: +try: #pragma: no cover import psyco psyco.bind(bdecode) psyco.bind(bencode)