From bde31306de4ff2b6e4945683e5deb821c85984e8 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 14 Dec 2019 06:14:16 -0500 Subject: Sample html report for 5.0 --- doc/sample_html/cogapp_backward_py.html | 138 ++++++++++++-------------------- 1 file changed, 51 insertions(+), 87 deletions(-) (limited to 'doc/sample_html/cogapp_backward_py.html') diff --git a/doc/sample_html/cogapp_backward_py.html b/doc/sample_html/cogapp_backward_py.html index 0b672d55..7a1468e7 100644 --- a/doc/sample_html/cogapp_backward_py.html +++ b/doc/sample_html/cogapp_backward_py.html @@ -1,16 +1,10 @@ - - - - - - Coverage for cogapp/backward.py: 57.14% + Coverage for cogapp/backward.py: 69.23% - @@ -20,28 +14,21 @@ - -
Hide keyboard shortcuts

Hot-keys on this page

@@ -64,80 +51,57 @@

-
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

-

9

-

10

-

11

-

12

-

13

-

14

-

15

-

16

-

17

-

18

-

19

-

20

-

21

-

22

-

23

-

24

-

25

-

26

- -
-

"""Compatibility between Py2 and Py3.""" 

-

 

-

import sys 

-

 

-

PY3 = sys.version_info[0] == 3 

-

 

-

7 ↛ 8line 7 didn't jump to line 8, because the condition on line 7 was never trueif PY3: 

-

string_types = (str,bytes) 

-

bytes_types = (bytes,) 

-

def b(s): 

-

return s.encode("latin-1") 

-

def to_bytes(s): 

-

return s.encode('utf8') 

-

else: 

-

string_types = (basestring,) 

-

bytes_types = (str,) 

-

def b(s): 

-

return s 

-

def to_bytes(s): 

-

return s 

-

 

-

# Pythons 2 and 3 differ on where to get StringIO 

-

try: 

-

from cStringIO import StringIO 

-

except ImportError: 

-

from io import StringIO 

- -
+

1"""Compatibility between Py2 and Py3.""" 

+

2 

+

3import sys 

+

4import unittest 

+

5 

+

6PY3 = sys.version_info[0] == 3 

+

7 

+

8if PY3: 8 ↛ 14line 8 didn't jump to line 14, because the condition on line 8 was never false

+

9 string_types = (str,bytes) 

+

10 bytes_types = (bytes,) 

+

11 def to_bytes(s): 

+

12 return s.encode('utf8') 

+

13else: 

+

14 string_types = (basestring,) 

+

15 bytes_types = (str,) 

+

16 def to_bytes(s): 

+

17 return s 

+

18 

+

19# Pythons 2 and 3 differ on where to get StringIO 

+

20try: 

+

21 from cStringIO import StringIO 

+

22except ImportError: 

+

23 from io import StringIO 

+

24 

+

25 

+

26def unittest_has(method): 

+

27 """Does `unittest.TestCase` have `method` defined?""" 

+

28 return hasattr(unittest.TestCase, method) 

+

29 

+

30 

+

31class TestCase(unittest.TestCase): 

+

32 """Just like unittest.TestCase, but with assert methods added. 

+

33 

+

34 Designed to be compatible with 3.1 unittest. Methods are only defined if 

+

35 `unittest` doesn't have them. 

+

36 

+

37 """ 

+

38 # pylint: disable=missing-docstring 

+

39 

+

40 if not unittest_has('assertRaisesRegex'): 40 ↛ 41line 40 didn't jump to line 41, because the condition on line 40 was never true

+

41 def assertRaisesRegex(self, *args, **kwargs): 

+

42 return self.assertRaisesRegexp(*args, **kwargs) 

- - -- cgit v1.2.1