From e80f5f8fbc370a49040f020f90982ca73767c9fd Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 17 Jan 2015 14:55:14 -0500 Subject: Use file names with extensions in reports. --HG-- rename : tests/farm/html/gold_a/a.html => tests/farm/html/gold_a/a_py.html rename : tests/farm/html/gold_b_branch/b.html => tests/farm/html/gold_b_branch/b_py.html rename : tests/farm/html/gold_bom/bom.html => tests/farm/html/gold_bom/bom_py.html rename : tests/farm/html/gold_isolatin1/isolatin1.html => tests/farm/html/gold_isolatin1/isolatin1_py.html rename : tests/farm/html/gold_omit_1/m1.html => tests/farm/html/gold_omit_1/m1_py.html rename : tests/farm/html/gold_omit_1/m2.html => tests/farm/html/gold_omit_1/m2_py.html rename : tests/farm/html/gold_omit_1/m3.html => tests/farm/html/gold_omit_1/m3_py.html rename : tests/farm/html/gold_omit_1/main.html => tests/farm/html/gold_omit_1/main_py.html rename : tests/farm/html/gold_omit_2/m2.html => tests/farm/html/gold_omit_2/m2_py.html rename : tests/farm/html/gold_omit_2/m3.html => tests/farm/html/gold_omit_2/m3_py.html rename : tests/farm/html/gold_omit_2/main.html => tests/farm/html/gold_omit_2/main_py.html rename : tests/farm/html/gold_omit_3/m3.html => tests/farm/html/gold_omit_3/m3_py.html rename : tests/farm/html/gold_omit_3/main.html => tests/farm/html/gold_omit_3/main_py.html rename : tests/farm/html/gold_omit_4/m1.html => tests/farm/html/gold_omit_4/m1_py.html rename : tests/farm/html/gold_omit_4/m3.html => tests/farm/html/gold_omit_4/m3_py.html rename : tests/farm/html/gold_omit_4/main.html => tests/farm/html/gold_omit_4/main_py.html rename : tests/farm/html/gold_omit_5/m1.html => tests/farm/html/gold_omit_5/m1_py.html rename : tests/farm/html/gold_omit_5/main.html => tests/farm/html/gold_omit_5/main_py.html rename : tests/farm/html/gold_other/blah_blah_other.html => tests/farm/html/gold_other/blah_blah_other_py.html rename : tests/farm/html/gold_other/here.html => tests/farm/html/gold_other/here_py.html rename : tests/farm/html/gold_partial/partial.html => tests/farm/html/gold_partial/partial_py.html rename : tests/farm/html/gold_styled/a.html => tests/farm/html/gold_styled/a_py.html rename : tests/farm/html/gold_unicode/unicode.html => tests/farm/html/gold_unicode/unicode_py.html --- tests/farm/html/gold_a/a.html | 99 ------------- tests/farm/html/gold_a/a_py.html | 99 +++++++++++++ tests/farm/html/gold_b_branch/b.html | 145 ------------------ tests/farm/html/gold_b_branch/b_py.html | 145 ++++++++++++++++++ tests/farm/html/gold_bom/bom.html | 107 -------------- tests/farm/html/gold_bom/bom_py.html | 107 ++++++++++++++ tests/farm/html/gold_isolatin1/isolatin1.html | 95 ------------ tests/farm/html/gold_isolatin1/isolatin1_py.html | 95 ++++++++++++ tests/farm/html/gold_omit_1/m1.html | 89 ----------- tests/farm/html/gold_omit_1/m1_py.html | 89 +++++++++++ tests/farm/html/gold_omit_1/m2.html | 89 ----------- tests/farm/html/gold_omit_1/m2_py.html | 89 +++++++++++ tests/farm/html/gold_omit_1/m3.html | 89 ----------- tests/farm/html/gold_omit_1/m3_py.html | 89 +++++++++++ tests/farm/html/gold_omit_1/main.html | 105 ------------- tests/farm/html/gold_omit_1/main_py.html | 105 +++++++++++++ tests/farm/html/gold_omit_2/m2.html | 89 ----------- tests/farm/html/gold_omit_2/m2_py.html | 89 +++++++++++ tests/farm/html/gold_omit_2/m3.html | 89 ----------- tests/farm/html/gold_omit_2/m3_py.html | 89 +++++++++++ tests/farm/html/gold_omit_2/main.html | 105 ------------- tests/farm/html/gold_omit_2/main_py.html | 105 +++++++++++++ tests/farm/html/gold_omit_3/m3.html | 89 ----------- tests/farm/html/gold_omit_3/m3_py.html | 89 +++++++++++ tests/farm/html/gold_omit_3/main.html | 105 ------------- tests/farm/html/gold_omit_3/main_py.html | 105 +++++++++++++ tests/farm/html/gold_omit_4/m1.html | 89 ----------- tests/farm/html/gold_omit_4/m1_py.html | 89 +++++++++++ tests/farm/html/gold_omit_4/m3.html | 89 ----------- tests/farm/html/gold_omit_4/m3_py.html | 89 +++++++++++ tests/farm/html/gold_omit_4/main.html | 105 ------------- tests/farm/html/gold_omit_4/main_py.html | 105 +++++++++++++ tests/farm/html/gold_omit_5/m1.html | 89 ----------- tests/farm/html/gold_omit_5/m1_py.html | 89 +++++++++++ tests/farm/html/gold_omit_5/main.html | 105 ------------- tests/farm/html/gold_omit_5/main_py.html | 105 +++++++++++++ tests/farm/html/gold_other/blah_blah_other.html | 93 ------------ tests/farm/html/gold_other/blah_blah_other_py.html | 93 ++++++++++++ tests/farm/html/gold_other/here.html | 101 ------------- tests/farm/html/gold_other/here_py.html | 101 +++++++++++++ tests/farm/html/gold_partial/partial.html | 123 ---------------- tests/farm/html/gold_partial/partial_py.html | 123 ++++++++++++++++ tests/farm/html/gold_styled/a.html | 101 ------------- tests/farm/html/gold_styled/a_py.html | 101 +++++++++++++ tests/farm/html/gold_unicode/unicode.html | 95 ------------ tests/farm/html/gold_unicode/unicode_py.html | 95 ++++++++++++ tests/farm/html/gold_x_xml/coverage.xml | 4 +- tests/farm/html/gold_y_xml_branch/coverage.xml | 4 +- tests/farm/html/run_a.py | 4 +- tests/farm/html/run_b_branch.py | 4 +- tests/farm/html/run_bom.py | 2 +- tests/farm/html/run_isolatin1.py | 2 +- tests/farm/html/run_other.py | 8 +- tests/farm/html/run_partial.py | 4 +- tests/farm/html/run_styled.py | 4 +- tests/farm/html/run_tabbed.py | 4 +- tests/farm/html/run_unicode.py | 4 +- tests/test_api.py | 20 +-- tests/test_codeunit.py | 48 +++--- tests/test_html.py | 38 ++--- tests/test_process.py | 8 +- tests/test_summary.py | 162 ++++++++++----------- 62 files changed, 2445 insertions(+), 2445 deletions(-) delete mode 100644 tests/farm/html/gold_a/a.html create mode 100644 tests/farm/html/gold_a/a_py.html delete mode 100644 tests/farm/html/gold_b_branch/b.html create mode 100644 tests/farm/html/gold_b_branch/b_py.html delete mode 100644 tests/farm/html/gold_bom/bom.html create mode 100644 tests/farm/html/gold_bom/bom_py.html delete mode 100644 tests/farm/html/gold_isolatin1/isolatin1.html create mode 100644 tests/farm/html/gold_isolatin1/isolatin1_py.html delete mode 100644 tests/farm/html/gold_omit_1/m1.html create mode 100644 tests/farm/html/gold_omit_1/m1_py.html delete mode 100644 tests/farm/html/gold_omit_1/m2.html create mode 100644 tests/farm/html/gold_omit_1/m2_py.html delete mode 100644 tests/farm/html/gold_omit_1/m3.html create mode 100644 tests/farm/html/gold_omit_1/m3_py.html delete mode 100644 tests/farm/html/gold_omit_1/main.html create mode 100644 tests/farm/html/gold_omit_1/main_py.html delete mode 100644 tests/farm/html/gold_omit_2/m2.html create mode 100644 tests/farm/html/gold_omit_2/m2_py.html delete mode 100644 tests/farm/html/gold_omit_2/m3.html create mode 100644 tests/farm/html/gold_omit_2/m3_py.html delete mode 100644 tests/farm/html/gold_omit_2/main.html create mode 100644 tests/farm/html/gold_omit_2/main_py.html delete mode 100644 tests/farm/html/gold_omit_3/m3.html create mode 100644 tests/farm/html/gold_omit_3/m3_py.html delete mode 100644 tests/farm/html/gold_omit_3/main.html create mode 100644 tests/farm/html/gold_omit_3/main_py.html delete mode 100644 tests/farm/html/gold_omit_4/m1.html create mode 100644 tests/farm/html/gold_omit_4/m1_py.html delete mode 100644 tests/farm/html/gold_omit_4/m3.html create mode 100644 tests/farm/html/gold_omit_4/m3_py.html delete mode 100644 tests/farm/html/gold_omit_4/main.html create mode 100644 tests/farm/html/gold_omit_4/main_py.html delete mode 100644 tests/farm/html/gold_omit_5/m1.html create mode 100644 tests/farm/html/gold_omit_5/m1_py.html delete mode 100644 tests/farm/html/gold_omit_5/main.html create mode 100644 tests/farm/html/gold_omit_5/main_py.html delete mode 100644 tests/farm/html/gold_other/blah_blah_other.html create mode 100644 tests/farm/html/gold_other/blah_blah_other_py.html delete mode 100644 tests/farm/html/gold_other/here.html create mode 100644 tests/farm/html/gold_other/here_py.html delete mode 100644 tests/farm/html/gold_partial/partial.html create mode 100644 tests/farm/html/gold_partial/partial_py.html delete mode 100644 tests/farm/html/gold_styled/a.html create mode 100644 tests/farm/html/gold_styled/a_py.html delete mode 100644 tests/farm/html/gold_unicode/unicode.html create mode 100644 tests/farm/html/gold_unicode/unicode_py.html (limited to 'tests') diff --git a/tests/farm/html/gold_a/a.html b/tests/farm/html/gold_a/a.html deleted file mode 100644 index 03c1fc95..00000000 --- a/tests/farm/html/gold_a/a.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - Coverage for a: 67% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

- -
-

# A test file for HTML reporting by coverage. 

-

 

-

if 1 < 2: 

-

    # Needed a < to look at HTML entities. 

-

    a = 3 

-

else: 

-

    a = 4 

- -
-
- - - - - diff --git a/tests/farm/html/gold_a/a_py.html b/tests/farm/html/gold_a/a_py.html new file mode 100644 index 00000000..03c1fc95 --- /dev/null +++ b/tests/farm/html/gold_a/a_py.html @@ -0,0 +1,99 @@ + + + + + + + + Coverage for a: 67% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+ +
+

# A test file for HTML reporting by coverage. 

+

 

+

if 1 < 2: 

+

    # Needed a < to look at HTML entities. 

+

    a = 3 

+

else: 

+

    a = 4 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_b_branch/b.html b/tests/farm/html/gold_b_branch/b.html deleted file mode 100644 index 15b06661..00000000 --- a/tests/farm/html/gold_b_branch/b.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - Coverage for b: 70% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

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

-

27

-

28

-

29

- -
-

# A test file for HTML reporting by coverage. 

-

 

-

def one(x): 

-

    # This will be a branch that misses the else. 

-

8    if x < 2: 

-

        a = 3 

-

    else: 

-

        a = 4 

-

 

-

one(1) 

-

 

-

def two(x): 

-

    # A missed else that branches to "exit" 

-

exit    if x: 

-

        a = 5 

-

 

-

two(1) 

-

 

-

def three(): 

-

    try: 

-

        # This if has two branches, *neither* one taken. 

-

23   25        if name_error_this_variable_doesnt_exist: 

-

            a = 1 

-

        else: 

-

            a = 2 

-

    except: 

-

        pass 

-

 

-

three() 

- -
-
- - - - - diff --git a/tests/farm/html/gold_b_branch/b_py.html b/tests/farm/html/gold_b_branch/b_py.html new file mode 100644 index 00000000..15b06661 --- /dev/null +++ b/tests/farm/html/gold_b_branch/b_py.html @@ -0,0 +1,145 @@ + + + + + + + + Coverage for b: 70% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

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

+

27

+

28

+

29

+ +
+

# A test file for HTML reporting by coverage. 

+

 

+

def one(x): 

+

    # This will be a branch that misses the else. 

+

8    if x < 2: 

+

        a = 3 

+

    else: 

+

        a = 4 

+

 

+

one(1) 

+

 

+

def two(x): 

+

    # A missed else that branches to "exit" 

+

exit    if x: 

+

        a = 5 

+

 

+

two(1) 

+

 

+

def three(): 

+

    try: 

+

        # This if has two branches, *neither* one taken. 

+

23   25        if name_error_this_variable_doesnt_exist: 

+

            a = 1 

+

        else: 

+

            a = 2 

+

    except: 

+

        pass 

+

 

+

three() 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_bom/bom.html b/tests/farm/html/gold_bom/bom.html deleted file mode 100644 index 40c64bdb..00000000 --- a/tests/farm/html/gold_bom/bom.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - Coverage for bom: 71% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

-

9

-

10

-

11

- -
-

# A python source file in utf-8, with BOM 

-

math = "3×4 = 12, ÷2 = 6±0" 

-

 

-

import sys 

-

 

-

if sys.version_info >= (3, 0): 

-

    assert len(math) == 18 

-

    assert len(math.encode('utf-8')) == 21 

-

else: 

-

    assert len(math) == 21 

-

    assert len(math.decode('utf-8')) == 18 

- -
-
- - - - - diff --git a/tests/farm/html/gold_bom/bom_py.html b/tests/farm/html/gold_bom/bom_py.html new file mode 100644 index 00000000..40c64bdb --- /dev/null +++ b/tests/farm/html/gold_bom/bom_py.html @@ -0,0 +1,107 @@ + + + + + + + + Coverage for bom: 71% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+

8

+

9

+

10

+

11

+ +
+

# A python source file in utf-8, with BOM 

+

math = "3×4 = 12, ÷2 = 6±0" 

+

 

+

import sys 

+

 

+

if sys.version_info >= (3, 0): 

+

    assert len(math) == 18 

+

    assert len(math.encode('utf-8')) == 21 

+

else: 

+

    assert len(math) == 21 

+

    assert len(math.decode('utf-8')) == 18 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_isolatin1/isolatin1.html b/tests/farm/html/gold_isolatin1/isolatin1.html deleted file mode 100644 index 0e4ac95a..00000000 --- a/tests/farm/html/gold_isolatin1/isolatin1.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - Coverage for isolatin1: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

- -
-

# A python source file in another encoding. 

-

# -*- coding: iso8859-1 -*- 

-

 

-

math = "3×4 = 12, ÷2 = 6±0" 

-

assert len(math) == 18 

- -
-
- - - - - diff --git a/tests/farm/html/gold_isolatin1/isolatin1_py.html b/tests/farm/html/gold_isolatin1/isolatin1_py.html new file mode 100644 index 00000000..0e4ac95a --- /dev/null +++ b/tests/farm/html/gold_isolatin1/isolatin1_py.html @@ -0,0 +1,95 @@ + + + + + + + + Coverage for isolatin1: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+ +
+

# A python source file in another encoding. 

+

# -*- coding: iso8859-1 -*- 

+

 

+

math = "3×4 = 12, ÷2 = 6±0" 

+

assert len(math) == 18 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_1/m1.html b/tests/farm/html/gold_omit_1/m1.html deleted file mode 100644 index de44f789..00000000 --- a/tests/farm/html/gold_omit_1/m1.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m1: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m1a = 1 

-

m1b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_1/m1_py.html b/tests/farm/html/gold_omit_1/m1_py.html new file mode 100644 index 00000000..de44f789 --- /dev/null +++ b/tests/farm/html/gold_omit_1/m1_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m1: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m1a = 1 

+

m1b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_1/m2.html b/tests/farm/html/gold_omit_1/m2.html deleted file mode 100644 index c775e6bb..00000000 --- a/tests/farm/html/gold_omit_1/m2.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m2: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m2a = 1 

-

m2b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_1/m2_py.html b/tests/farm/html/gold_omit_1/m2_py.html new file mode 100644 index 00000000..c775e6bb --- /dev/null +++ b/tests/farm/html/gold_omit_1/m2_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m2: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m2a = 1 

+

m2b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_1/m3.html b/tests/farm/html/gold_omit_1/m3.html deleted file mode 100644 index 67354c48..00000000 --- a/tests/farm/html/gold_omit_1/m3.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m3: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m3a = 1 

-

m3b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_1/m3_py.html b/tests/farm/html/gold_omit_1/m3_py.html new file mode 100644 index 00000000..67354c48 --- /dev/null +++ b/tests/farm/html/gold_omit_1/m3_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m3: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m3a = 1 

+

m3b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_1/main.html b/tests/farm/html/gold_omit_1/main.html deleted file mode 100644 index a71b10e4..00000000 --- a/tests/farm/html/gold_omit_1/main.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - Coverage for main: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

-

9

-

10

- -
-

import m1 

-

import m2 

-

import m3 

-

 

-

a = 5 

-

b = 6 

-

 

-

assert m1.m1a == 1 

-

assert m2.m2a == 1 

-

assert m3.m3a == 1 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_1/main_py.html b/tests/farm/html/gold_omit_1/main_py.html new file mode 100644 index 00000000..a71b10e4 --- /dev/null +++ b/tests/farm/html/gold_omit_1/main_py.html @@ -0,0 +1,105 @@ + + + + + + + + Coverage for main: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+

8

+

9

+

10

+ +
+

import m1 

+

import m2 

+

import m3 

+

 

+

a = 5 

+

b = 6 

+

 

+

assert m1.m1a == 1 

+

assert m2.m2a == 1 

+

assert m3.m3a == 1 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_2/m2.html b/tests/farm/html/gold_omit_2/m2.html deleted file mode 100644 index c775e6bb..00000000 --- a/tests/farm/html/gold_omit_2/m2.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m2: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m2a = 1 

-

m2b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_2/m2_py.html b/tests/farm/html/gold_omit_2/m2_py.html new file mode 100644 index 00000000..c775e6bb --- /dev/null +++ b/tests/farm/html/gold_omit_2/m2_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m2: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m2a = 1 

+

m2b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_2/m3.html b/tests/farm/html/gold_omit_2/m3.html deleted file mode 100644 index 67354c48..00000000 --- a/tests/farm/html/gold_omit_2/m3.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m3: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m3a = 1 

-

m3b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_2/m3_py.html b/tests/farm/html/gold_omit_2/m3_py.html new file mode 100644 index 00000000..67354c48 --- /dev/null +++ b/tests/farm/html/gold_omit_2/m3_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m3: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m3a = 1 

+

m3b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_2/main.html b/tests/farm/html/gold_omit_2/main.html deleted file mode 100644 index a71b10e4..00000000 --- a/tests/farm/html/gold_omit_2/main.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - Coverage for main: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

-

9

-

10

- -
-

import m1 

-

import m2 

-

import m3 

-

 

-

a = 5 

-

b = 6 

-

 

-

assert m1.m1a == 1 

-

assert m2.m2a == 1 

-

assert m3.m3a == 1 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_2/main_py.html b/tests/farm/html/gold_omit_2/main_py.html new file mode 100644 index 00000000..a71b10e4 --- /dev/null +++ b/tests/farm/html/gold_omit_2/main_py.html @@ -0,0 +1,105 @@ + + + + + + + + Coverage for main: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+

8

+

9

+

10

+ +
+

import m1 

+

import m2 

+

import m3 

+

 

+

a = 5 

+

b = 6 

+

 

+

assert m1.m1a == 1 

+

assert m2.m2a == 1 

+

assert m3.m3a == 1 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_3/m3.html b/tests/farm/html/gold_omit_3/m3.html deleted file mode 100644 index 67354c48..00000000 --- a/tests/farm/html/gold_omit_3/m3.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m3: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m3a = 1 

-

m3b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_3/m3_py.html b/tests/farm/html/gold_omit_3/m3_py.html new file mode 100644 index 00000000..67354c48 --- /dev/null +++ b/tests/farm/html/gold_omit_3/m3_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m3: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m3a = 1 

+

m3b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_3/main.html b/tests/farm/html/gold_omit_3/main.html deleted file mode 100644 index a71b10e4..00000000 --- a/tests/farm/html/gold_omit_3/main.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - Coverage for main: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

-

9

-

10

- -
-

import m1 

-

import m2 

-

import m3 

-

 

-

a = 5 

-

b = 6 

-

 

-

assert m1.m1a == 1 

-

assert m2.m2a == 1 

-

assert m3.m3a == 1 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_3/main_py.html b/tests/farm/html/gold_omit_3/main_py.html new file mode 100644 index 00000000..a71b10e4 --- /dev/null +++ b/tests/farm/html/gold_omit_3/main_py.html @@ -0,0 +1,105 @@ + + + + + + + + Coverage for main: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+

8

+

9

+

10

+ +
+

import m1 

+

import m2 

+

import m3 

+

 

+

a = 5 

+

b = 6 

+

 

+

assert m1.m1a == 1 

+

assert m2.m2a == 1 

+

assert m3.m3a == 1 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_4/m1.html b/tests/farm/html/gold_omit_4/m1.html deleted file mode 100644 index de44f789..00000000 --- a/tests/farm/html/gold_omit_4/m1.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m1: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m1a = 1 

-

m1b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_4/m1_py.html b/tests/farm/html/gold_omit_4/m1_py.html new file mode 100644 index 00000000..de44f789 --- /dev/null +++ b/tests/farm/html/gold_omit_4/m1_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m1: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m1a = 1 

+

m1b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_4/m3.html b/tests/farm/html/gold_omit_4/m3.html deleted file mode 100644 index 67354c48..00000000 --- a/tests/farm/html/gold_omit_4/m3.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m3: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m3a = 1 

-

m3b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_4/m3_py.html b/tests/farm/html/gold_omit_4/m3_py.html new file mode 100644 index 00000000..67354c48 --- /dev/null +++ b/tests/farm/html/gold_omit_4/m3_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m3: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m3a = 1 

+

m3b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_4/main.html b/tests/farm/html/gold_omit_4/main.html deleted file mode 100644 index a71b10e4..00000000 --- a/tests/farm/html/gold_omit_4/main.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - Coverage for main: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

-

9

-

10

- -
-

import m1 

-

import m2 

-

import m3 

-

 

-

a = 5 

-

b = 6 

-

 

-

assert m1.m1a == 1 

-

assert m2.m2a == 1 

-

assert m3.m3a == 1 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_4/main_py.html b/tests/farm/html/gold_omit_4/main_py.html new file mode 100644 index 00000000..a71b10e4 --- /dev/null +++ b/tests/farm/html/gold_omit_4/main_py.html @@ -0,0 +1,105 @@ + + + + + + + + Coverage for main: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+

8

+

9

+

10

+ +
+

import m1 

+

import m2 

+

import m3 

+

 

+

a = 5 

+

b = 6 

+

 

+

assert m1.m1a == 1 

+

assert m2.m2a == 1 

+

assert m3.m3a == 1 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_5/m1.html b/tests/farm/html/gold_omit_5/m1.html deleted file mode 100644 index de44f789..00000000 --- a/tests/farm/html/gold_omit_5/m1.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - Coverage for m1: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

- -
-

m1a = 1 

-

m1b = 2 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_5/m1_py.html b/tests/farm/html/gold_omit_5/m1_py.html new file mode 100644 index 00000000..de44f789 --- /dev/null +++ b/tests/farm/html/gold_omit_5/m1_py.html @@ -0,0 +1,89 @@ + + + + + + + + Coverage for m1: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+ +
+

m1a = 1 

+

m1b = 2 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_omit_5/main.html b/tests/farm/html/gold_omit_5/main.html deleted file mode 100644 index a71b10e4..00000000 --- a/tests/farm/html/gold_omit_5/main.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - Coverage for main: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

-

9

-

10

- -
-

import m1 

-

import m2 

-

import m3 

-

 

-

a = 5 

-

b = 6 

-

 

-

assert m1.m1a == 1 

-

assert m2.m2a == 1 

-

assert m3.m3a == 1 

- -
-
- - - - - diff --git a/tests/farm/html/gold_omit_5/main_py.html b/tests/farm/html/gold_omit_5/main_py.html new file mode 100644 index 00000000..a71b10e4 --- /dev/null +++ b/tests/farm/html/gold_omit_5/main_py.html @@ -0,0 +1,105 @@ + + + + + + + + Coverage for main: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+

8

+

9

+

10

+ +
+

import m1 

+

import m2 

+

import m3 

+

 

+

a = 5 

+

b = 6 

+

 

+

assert m1.m1a == 1 

+

assert m2.m2a == 1 

+

assert m3.m3a == 1 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_other/blah_blah_other.html b/tests/farm/html/gold_other/blah_blah_other.html deleted file mode 100644 index f070f3ef..00000000 --- a/tests/farm/html/gold_other/blah_blah_other.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - Coverage for /Users/ned/coverage/trunk/tests/farm/html/othersrc/other: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

- -
-

# A file in another directory.  We're checking that it ends up in the 

-

# HTML report. 

-

 

-

print("This is the other src!") 

- -
-
- - - - - diff --git a/tests/farm/html/gold_other/blah_blah_other_py.html b/tests/farm/html/gold_other/blah_blah_other_py.html new file mode 100644 index 00000000..f070f3ef --- /dev/null +++ b/tests/farm/html/gold_other/blah_blah_other_py.html @@ -0,0 +1,93 @@ + + + + + + + + Coverage for /Users/ned/coverage/trunk/tests/farm/html/othersrc/other: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+ +
+

# A file in another directory.  We're checking that it ends up in the 

+

# HTML report. 

+

 

+

print("This is the other src!") 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_other/here.html b/tests/farm/html/gold_other/here.html deleted file mode 100644 index e091395a..00000000 --- a/tests/farm/html/gold_other/here.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - Coverage for here: 75% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

- -
-

# A test file for HTML reporting by coverage. 

-

 

-

import other 

-

 

-

if 1 < 2: 

-

    h = 3 

-

else: 

-

    h = 4 

- -
-
- - - - - diff --git a/tests/farm/html/gold_other/here_py.html b/tests/farm/html/gold_other/here_py.html new file mode 100644 index 00000000..e091395a --- /dev/null +++ b/tests/farm/html/gold_other/here_py.html @@ -0,0 +1,101 @@ + + + + + + + + Coverage for here: 75% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+

8

+ +
+

# A test file for HTML reporting by coverage. 

+

 

+

import other 

+

 

+

if 1 < 2: 

+

    h = 3 

+

else: 

+

    h = 4 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_partial/partial.html b/tests/farm/html/gold_partial/partial.html deleted file mode 100644 index 64dfacfa..00000000 --- a/tests/farm/html/gold_partial/partial.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - Coverage for partial: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

-

8

-

9

-

10

-

11

-

12

-

13

-

14

-

15

-

16

-

17

-

18

- -
-

# partial branches 

-

 

-

a = 3 

-

 

-

while True: 

-

    break 

-

 

-

while 1: 

-

    break 

-

 

-

while a:        # pragma: no branch 

-

    break 

-

 

-

if 0: 

-

    never_happen() 

-

 

-

if 1: 

-

    a = 13 

- -
-
- - - - - diff --git a/tests/farm/html/gold_partial/partial_py.html b/tests/farm/html/gold_partial/partial_py.html new file mode 100644 index 00000000..64dfacfa --- /dev/null +++ b/tests/farm/html/gold_partial/partial_py.html @@ -0,0 +1,123 @@ + + + + + + + + Coverage for partial: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+

8

+

9

+

10

+

11

+

12

+

13

+

14

+

15

+

16

+

17

+

18

+ +
+

# partial branches 

+

 

+

a = 3 

+

 

+

while True: 

+

    break 

+

 

+

while 1: 

+

    break 

+

 

+

while a:        # pragma: no branch 

+

    break 

+

 

+

if 0: 

+

    never_happen() 

+

 

+

if 1: 

+

    a = 13 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_styled/a.html b/tests/farm/html/gold_styled/a.html deleted file mode 100644 index 9fdaee17..00000000 --- a/tests/farm/html/gold_styled/a.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - Coverage for a: 67% - - - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

-

6

-

7

- -
-

# A test file for HTML reporting by coverage. 

-

 

-

if 1 < 2: 

-

    # Needed a < to look at HTML entities. 

-

    a = 3 

-

else: 

-

    a = 4 

- -
-
- - - - - diff --git a/tests/farm/html/gold_styled/a_py.html b/tests/farm/html/gold_styled/a_py.html new file mode 100644 index 00000000..9fdaee17 --- /dev/null +++ b/tests/farm/html/gold_styled/a_py.html @@ -0,0 +1,101 @@ + + + + + + + + Coverage for a: 67% + + + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+

6

+

7

+ +
+

# A test file for HTML reporting by coverage. 

+

 

+

if 1 < 2: 

+

    # Needed a < to look at HTML entities. 

+

    a = 3 

+

else: 

+

    a = 4 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_unicode/unicode.html b/tests/farm/html/gold_unicode/unicode.html deleted file mode 100644 index d67af56d..00000000 --- a/tests/farm/html/gold_unicode/unicode.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - Coverage for unicode: 100% - - - - - - - - - - - - -
- Hide keyboard shortcuts -

Hot-keys on this page

-
-

- r - m - x - p   toggle line displays -

-

- j - k   next/prev highlighted chunk -

-

- 0   (zero) top of page -

-

- 1   (one) first highlighted chunk -

-
-
- -
- - - - - -
-

1

-

2

-

3

-

4

-

5

- -
-

# A python source file with exotic characters 

-

# -*- coding: utf-8 -*- 

-

 

-

upside_down = "ʎd˙ǝbɐɹǝʌoɔ" 

-

surrogate = "db40,dd00: x󠄀" 

- -
-
- - - - - diff --git a/tests/farm/html/gold_unicode/unicode_py.html b/tests/farm/html/gold_unicode/unicode_py.html new file mode 100644 index 00000000..d67af56d --- /dev/null +++ b/tests/farm/html/gold_unicode/unicode_py.html @@ -0,0 +1,95 @@ + + + + + + + + Coverage for unicode: 100% + + + + + + + + + + + + +
+ Hide keyboard shortcuts +

Hot-keys on this page

+
+

+ r + m + x + p   toggle line displays +

+

+ j + k   next/prev highlighted chunk +

+

+ 0   (zero) top of page +

+

+ 1   (one) first highlighted chunk +

+
+
+ +
+ + + + + +
+

1

+

2

+

3

+

4

+

5

+ +
+

# A python source file with exotic characters 

+

# -*- coding: utf-8 -*- 

+

 

+

upside_down = "ʎd˙ǝbɐɹǝʌoɔ" 

+

surrogate = "db40,dd00: x󠄀" 

+ +
+
+ + + + + diff --git a/tests/farm/html/gold_x_xml/coverage.xml b/tests/farm/html/gold_x_xml/coverage.xml index d5a8c442..f528e123 100644 --- a/tests/farm/html/gold_x_xml/coverage.xml +++ b/tests/farm/html/gold_x_xml/coverage.xml @@ -7,9 +7,9 @@ - + - + diff --git a/tests/farm/html/gold_y_xml_branch/coverage.xml b/tests/farm/html/gold_y_xml_branch/coverage.xml index 86e9e73c..eb0c5323 100644 --- a/tests/farm/html/gold_y_xml_branch/coverage.xml +++ b/tests/farm/html/gold_y_xml_branch/coverage.xml @@ -7,9 +7,9 @@ - + - + diff --git a/tests/farm/html/run_a.py b/tests/farm/html/run_a.py index 3fabd6f5..7963d2e5 100644 --- a/tests/farm/html/run_a.py +++ b/tests/farm/html/run_a.py @@ -12,13 +12,13 @@ runfunc(html_it, rundir="src") # HTML files will change often. Check that the sizes are reasonable, # and check that certain key strings are in the output. compare("gold_a", "html_a", size_within=10, file_pattern="*.html") -contains("html_a/a.html", +contains("html_a/a_py.html", "if 1 < 2", "    a = 3", "67%" ) contains("html_a/index.html", - "a", + "a.py", "67%", "67%", ) diff --git a/tests/farm/html/run_b_branch.py b/tests/farm/html/run_b_branch.py index 0e584a6d..c92252ce 100644 --- a/tests/farm/html/run_b_branch.py +++ b/tests/farm/html/run_b_branch.py @@ -12,7 +12,7 @@ runfunc(html_it, rundir="src") # HTML files will change often. Check that the sizes are reasonable, # and check that certain key strings are in the output. compare("gold_b_branch", "html_b_branch", size_within=10, file_pattern="*.html") -contains("html_b_branch/b.html", +contains("html_b_branch/b_py.html", "if x < 2", "    a = 3", "70%", @@ -21,7 +21,7 @@ contains("html_b_branch/b.html", "23   25", ) contains("html_b_branch/index.html", - "b", + "b.py", "70%", "70%", ) diff --git a/tests/farm/html/run_bom.py b/tests/farm/html/run_bom.py index c35079be..96949756 100644 --- a/tests/farm/html/run_bom.py +++ b/tests/farm/html/run_bom.py @@ -14,7 +14,7 @@ runfunc(html_it, rundir="src") # HTML files will change often. Check that the sizes are reasonable, # and check that certain key strings are in the output. compare("gold_bom", "html_bom", size_within=10, file_pattern="*.html") -contains("html_bom/bom.html", +contains("html_bom/bom_py.html", ""3×4 = 12, ÷2 = 6±0"", ) diff --git a/tests/farm/html/run_isolatin1.py b/tests/farm/html/run_isolatin1.py index 063e6e00..bf3746d2 100644 --- a/tests/farm/html/run_isolatin1.py +++ b/tests/farm/html/run_isolatin1.py @@ -14,7 +14,7 @@ runfunc(html_it, rundir="src") # HTML files will change often. Check that the sizes are reasonable, # and check that certain key strings are in the output. compare("gold_isolatin1", "html_isolatin1", size_within=10, file_pattern="*.html") -contains("html_isolatin1/isolatin1.html", +contains("html_isolatin1/isolatin1_py.html", ""3×4 = 12, ÷2 = 6±0"", ) diff --git a/tests/farm/html/run_other.py b/tests/farm/html/run_other.py index 23ce29f9..05efa0fc 100644 --- a/tests/farm/html/run_other.py +++ b/tests/farm/html/run_other.py @@ -12,15 +12,15 @@ runfunc(html_it, rundir="src", addtopath="../othersrc") # Different platforms will name the "other" file differently. Rename it import os, glob -for p in glob.glob("html_other/*_other.html"): - os.rename(p, "html_other/blah_blah_other.html") +for p in glob.glob("html_other/*_other_py.html"): + os.rename(p, "html_other/blah_blah_other_py.html") # HTML files will change often. Check that the sizes are reasonable, # and check that certain key strings are in the output. compare("gold_other", "html_other", size_within=10, file_pattern="*.html") contains("html_other/index.html", - "here", - "other.html'>", "other", + "here.py", + "other_py.html'>", "other.py", ) clean("html_other") diff --git a/tests/farm/html/run_partial.py b/tests/farm/html/run_partial.py index eab14411..38790796 100644 --- a/tests/farm/html/run_partial.py +++ b/tests/farm/html/run_partial.py @@ -14,7 +14,7 @@ runfunc(html_it, rundir="src") # HTML files will change often. Check that the sizes are reasonable, # and check that certain key strings are in the output. compare("gold_partial", "html_partial", size_within=10, file_pattern="*.html") -contains("html_partial/partial.html", +contains("html_partial/partial_py.html", "

", "

", "

", @@ -22,7 +22,7 @@ contains("html_partial/partial.html", "

", ) contains("html_partial/index.html", - "partial", + "partial.py", ) contains("html_partial/index.html", "100%" diff --git a/tests/farm/html/run_styled.py b/tests/farm/html/run_styled.py index ac538ff5..a18096a4 100644 --- a/tests/farm/html/run_styled.py +++ b/tests/farm/html/run_styled.py @@ -13,7 +13,7 @@ runfunc(html_it, rundir="src") # and check that certain key strings are in the output. compare("gold_styled", "html_styled", size_within=10, file_pattern="*.html") compare("gold_styled", "html_styled", size_within=10, file_pattern="*.css") -contains("html_styled/a.html", +contains("html_styled/a_py.html", "", "if 1 < 2", "    a = 3", @@ -21,7 +21,7 @@ contains("html_styled/a.html", ) contains("html_styled/index.html", "", - "a", + "a.py", "67%" ) diff --git a/tests/farm/html/run_tabbed.py b/tests/farm/html/run_tabbed.py index 0e9b5278..679db2ed 100644 --- a/tests/farm/html/run_tabbed.py +++ b/tests/farm/html/run_tabbed.py @@ -12,7 +12,7 @@ runfunc(html_it, rundir="src") # Editors like to change things, make sure our source file still has tabs. contains("src/tabbed.py", "\tif x:\t\t\t\t\t# look nice") -contains("html_tabbed/tabbed.html", +contains("html_tabbed/tabbed_py.html", ">        if " "x:" "                    " @@ -20,5 +20,5 @@ contains("html_tabbed/tabbed.html", "# look nice" ) -doesnt_contain("html_tabbed/tabbed.html", "\t") +doesnt_contain("html_tabbed/tabbed_py.html", "\t") clean("html_tabbed") diff --git a/tests/farm/html/run_unicode.py b/tests/farm/html/run_unicode.py index c8cb6c50..ba34f63e 100644 --- a/tests/farm/html/run_unicode.py +++ b/tests/farm/html/run_unicode.py @@ -12,11 +12,11 @@ runfunc(html_it, rundir="src") # HTML files will change often. Check that the sizes are reasonable, # and check that certain key strings are in the output. compare("gold_unicode", "html_unicode", size_within=10, file_pattern="*.html") -contains("html_unicode/unicode.html", +contains("html_unicode/unicode_py.html", ""ʎd˙ǝbɐɹǝʌoɔ"", ) -contains_any("html_unicode/unicode.html", +contains_any("html_unicode/unicode_py.html", ""db40,dd00: x��"", ""db40,dd00: x󠄀"", ) diff --git a/tests/test_api.py b/tests/test_api.py index 08f4e059..00f6dbe8 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -57,9 +57,9 @@ class SingletonApiTest(CoverageTest): self.do_report_work("mycode2") coverage.report(["mycode2.py"]) self.assertEqual(self.stdout(), textwrap.dedent("""\ - Name Stmts Miss Cover Missing - --------------------------------------- - mycode2 7 3 57% 4-6 + Name Stmts Miss Cover Missing + ------------------------------------------ + mycode2.py 7 3 57% 4-6 """)) def test_report_file(self): @@ -69,9 +69,9 @@ class SingletonApiTest(CoverageTest): coverage.report(["mycode3.py"], file=fout) self.assertEqual(self.stdout(), "") self.assertEqual(fout.getvalue(), textwrap.dedent("""\ - Name Stmts Miss Cover Missing - --------------------------------------- - mycode3 7 3 57% 4-6 + Name Stmts Miss Cover Missing + ------------------------------------------ + mycode3.py 7 3 57% 4-6 """)) def test_report_default(self): @@ -79,7 +79,7 @@ class SingletonApiTest(CoverageTest): self.do_report_work("mycode4") coverage.report() rpt = re.sub(r"\s+", " ", self.stdout()) - self.assertIn("mycode4 7 3 57% 4-6", rpt) + self.assertIn("mycode4.py 7 3 57% 4-6", rpt) class ApiTest(CoverageTest): @@ -571,9 +571,9 @@ class PluginTest(CoverageTest): cov.save() cov.report(["no_biggie.py"]) self.assertEqual(self.stdout(), textwrap.dedent("""\ - Name Stmts Miss Cover Missing - ----------------------------------------- - no_biggie 4 1 75% 4 + Name Stmts Miss Cover Missing + -------------------------------------------- + no_biggie.py 4 1 75% 4 """)) def test_nose_plugin(self): diff --git a/tests/test_codeunit.py b/tests/test_codeunit.py index 54e525b9..1a064fca 100644 --- a/tests/test_codeunit.py +++ b/tests/test_codeunit.py @@ -27,12 +27,12 @@ class CodeUnitTest(CoverageTest): acu = PythonCodeUnit("aa/afile.py") bcu = PythonCodeUnit("aa/bb/bfile.py") ccu = PythonCodeUnit("aa/bb/cc/cfile.py") - self.assertEqual(acu.name, "aa/afile") - self.assertEqual(bcu.name, "aa/bb/bfile") - self.assertEqual(ccu.name, "aa/bb/cc/cfile") - self.assertEqual(acu.flat_rootname(), "aa_afile") - self.assertEqual(bcu.flat_rootname(), "aa_bb_bfile") - self.assertEqual(ccu.flat_rootname(), "aa_bb_cc_cfile") + self.assertEqual(acu.name, "aa/afile.py") + self.assertEqual(bcu.name, "aa/bb/bfile.py") + self.assertEqual(ccu.name, "aa/bb/cc/cfile.py") + self.assertEqual(acu.flat_rootname(), "aa_afile_py") + self.assertEqual(bcu.flat_rootname(), "aa_bb_bfile_py") + self.assertEqual(ccu.flat_rootname(), "aa_bb_cc_cfile_py") self.assertEqual(acu.source(), "# afile.py\n") self.assertEqual(bcu.source(), "# bfile.py\n") self.assertEqual(ccu.source(), "# cfile.py\n") @@ -41,12 +41,12 @@ class CodeUnitTest(CoverageTest): acu = PythonCodeUnit("aa/afile.odd.py") bcu = PythonCodeUnit("aa/bb/bfile.odd.py") b2cu = PythonCodeUnit("aa/bb.odd/bfile.py") - self.assertEqual(acu.name, "aa/afile.odd") - self.assertEqual(bcu.name, "aa/bb/bfile.odd") - self.assertEqual(b2cu.name, "aa/bb.odd/bfile") - self.assertEqual(acu.flat_rootname(), "aa_afile_odd") - self.assertEqual(bcu.flat_rootname(), "aa_bb_bfile_odd") - self.assertEqual(b2cu.flat_rootname(), "aa_bb_odd_bfile") + self.assertEqual(acu.name, "aa/afile.odd.py") + self.assertEqual(bcu.name, "aa/bb/bfile.odd.py") + self.assertEqual(b2cu.name, "aa/bb.odd/bfile.py") + self.assertEqual(acu.flat_rootname(), "aa_afile_odd_py") + self.assertEqual(bcu.flat_rootname(), "aa_bb_bfile_odd_py") + self.assertEqual(b2cu.flat_rootname(), "aa_bb_odd_bfile_py") self.assertEqual(acu.source(), "# afile.odd.py\n") self.assertEqual(bcu.source(), "# bfile.odd.py\n") self.assertEqual(b2cu.source(), "# bfile.py\n") @@ -59,12 +59,12 @@ class CodeUnitTest(CoverageTest): acu = PythonCodeUnit(aa) bcu = PythonCodeUnit(aa.bb) ccu = PythonCodeUnit(aa.bb.cc) - self.assertEqual(acu.name, "aa") - self.assertEqual(bcu.name, "aa.bb") - self.assertEqual(ccu.name, "aa.bb.cc") - self.assertEqual(acu.flat_rootname(), "aa") - self.assertEqual(bcu.flat_rootname(), "aa_bb") - self.assertEqual(ccu.flat_rootname(), "aa_bb_cc") + self.assertEqual(acu.name, "aa.py") + self.assertEqual(bcu.name, "aa/bb.py") + self.assertEqual(ccu.name, "aa/bb/cc.py") + self.assertEqual(acu.flat_rootname(), "aa_py") + self.assertEqual(bcu.flat_rootname(), "aa_bb_py") + self.assertEqual(ccu.flat_rootname(), "aa_bb_cc_py") self.assertEqual(acu.source(), "# aa\n") self.assertEqual(bcu.source(), "# bb\n") self.assertEqual(ccu.source(), "") # yes, empty @@ -77,12 +77,12 @@ class CodeUnitTest(CoverageTest): acu = PythonCodeUnit(aa.afile) bcu = PythonCodeUnit(aa.bb.bfile) ccu = PythonCodeUnit(aa.bb.cc.cfile) - self.assertEqual(acu.name, "aa.afile") - self.assertEqual(bcu.name, "aa.bb.bfile") - self.assertEqual(ccu.name, "aa.bb.cc.cfile") - self.assertEqual(acu.flat_rootname(), "aa_afile") - self.assertEqual(bcu.flat_rootname(), "aa_bb_bfile") - self.assertEqual(ccu.flat_rootname(), "aa_bb_cc_cfile") + self.assertEqual(acu.name, "aa/afile.py") + self.assertEqual(bcu.name, "aa/bb/bfile.py") + self.assertEqual(ccu.name, "aa/bb/cc/cfile.py") + self.assertEqual(acu.flat_rootname(), "aa_afile_py") + self.assertEqual(bcu.flat_rootname(), "aa_bb_bfile_py") + self.assertEqual(ccu.flat_rootname(), "aa_bb_cc_cfile_py") self.assertEqual(acu.source(), "# afile.py\n") self.assertEqual(bcu.source(), "# bfile.py\n") self.assertEqual(ccu.source(), "# cfile.py\n") diff --git a/tests/test_html.py b/tests/test_html.py index cf143cc1..cc817985 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -38,13 +38,13 @@ class HtmlTestHelpers(CoverageTest): def remove_html_files(self): """Remove the HTML files created as part of the HTML report.""" os.remove("htmlcov/index.html") - os.remove("htmlcov/main_file.html") - os.remove("htmlcov/helper1.html") - os.remove("htmlcov/helper2.html") + os.remove("htmlcov/main_file_py.html") + os.remove("htmlcov/helper1_py.html") + os.remove("htmlcov/helper2_py.html") def get_html_report_content(self, module): """Return the content of the HTML report for `module`.""" - filename = module.replace(".py", ".html").replace("/", "_") + filename = module.replace(".", "_").replace("/", "_") + ".html" filename = os.path.join("htmlcov", filename) with open(filename) as f: return f.read() @@ -70,9 +70,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): self.run_coverage() self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/main_file.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_exists("htmlcov/helper2.html") + self.assert_exists("htmlcov/main_file_py.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_exists("htmlcov/helper2_py.html") self.assert_exists("htmlcov/style.css") self.assert_exists("htmlcov/coverage_html.js") @@ -96,9 +96,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): # Only the changed files should have been created. self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_doesnt_exist("htmlcov/main_file.html") - self.assert_doesnt_exist("htmlcov/helper2.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_doesnt_exist("htmlcov/main_file_py.html") + self.assert_doesnt_exist("htmlcov/helper2_py.html") with open("htmlcov/index.html") as f: index2 = f.read() self.assertMultiLineEqual(index1, index2) @@ -121,9 +121,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): # Only the changed files should have been created. self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_exists("htmlcov/main_file.html") - self.assert_doesnt_exist("htmlcov/helper2.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_exists("htmlcov/main_file_py.html") + self.assert_doesnt_exist("htmlcov/helper2_py.html") def test_html_delta_from_settings_change(self): # HTML generation can create only the files that have changed. @@ -139,9 +139,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): # All the files have been reported again. self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_exists("htmlcov/main_file.html") - self.assert_exists("htmlcov/helper2.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_exists("htmlcov/main_file_py.html") + self.assert_exists("htmlcov/helper2_py.html") with open("htmlcov/index.html") as f: index2 = f.read() self.assertMultiLineEqual(index1, index2) @@ -163,9 +163,9 @@ class HtmlDeltaTest(HtmlTestHelpers, CoverageTest): # All the files have been reported again. self.assert_exists("htmlcov/index.html") - self.assert_exists("htmlcov/helper1.html") - self.assert_exists("htmlcov/main_file.html") - self.assert_exists("htmlcov/helper2.html") + self.assert_exists("htmlcov/helper1_py.html") + self.assert_exists("htmlcov/main_file_py.html") + self.assert_exists("htmlcov/helper2_py.html") with open("htmlcov/index.html") as f: index2 = f.read() fixed_index2 = index2.replace("XYZZY", self.real_coverage_version) diff --git a/tests/test_process.py b/tests/test_process.py index 0409e4a1..569618ee 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -170,9 +170,9 @@ class ProcessTest(CoverageTest): # Reporting should still work even with the .rc file out = self.run_command("coverage report") self.assertMultiLineEqual(out, textwrap.dedent("""\ - Name Stmts Miss Cover - ---------------------------- - b_or_c 7 0 100% + Name Stmts Miss Cover + ------------------------------- + b_or_c.py 7 0 100% """)) def test_combine_with_aliases(self): @@ -636,7 +636,7 @@ class FailUnderTest(CoverageTest): self.assertEqual(st, 0) self.assertEqual( self.last_line_squeezed(out), - "forty_two_plus 7 4 43%" + "forty_two_plus.py 7 4 43%" ) def test_report(self): diff --git a/tests/test_summary.py b/tests/test_summary.py index 21817a52..8c9cf6d7 100644 --- a/tests/test_summary.py +++ b/tests/test_summary.py @@ -26,18 +26,18 @@ class SummaryTest(CoverageTest): self.assertEqual(out, 'done\n') report = self.report_from_command("coverage report") - # Name Stmts Miss Cover - # --------------------------------------------------------------------- - # c:/ned/coverage/trunk/tests/modules/covmod1 2 0 100% - # c:/ned/coverage/trunk/tests/zipmods.zip/covmodzip1 2 0 100% - # mycode 4 0 100% - # --------------------------------------------------------------------- - # TOTAL 8 0 100% + # Name Stmts Miss Cover + # ------------------------------------------------------------------------ + # c:/ned/coverage/trunk/tests/modules/covmod1.py 2 0 100% + # c:/ned/coverage/trunk/tests/zipmods.zip/covmodzip1.py 2 0 100% + # mycode.py 4 0 100% + # ------------------------------------------------------------------------ + # TOTAL 8 0 100% self.assertNotIn("/coverage/__init__/", report) - self.assertIn("/tests/modules/covmod1 ", report) - self.assertIn("/tests/zipmods.zip/covmodzip1 ", report) - self.assertIn("mycode ", report) + self.assertIn("/tests/modules/covmod1.py ", report) + self.assertIn("/tests/zipmods.zip/covmodzip1.py ", report) + self.assertIn("mycode.py ", report) self.assertEqual(self.last_line_squeezed(report), "TOTAL 8 0 100%") def test_report_just_one(self): @@ -45,32 +45,32 @@ class SummaryTest(CoverageTest): self.run_command("coverage run mycode.py") report = self.report_from_command("coverage report mycode.py") - # Name Stmts Miss Cover - # ---------------------------- - # mycode 4 0 100% + # Name Stmts Miss Cover + # ------------------------------- + # mycode.py 4 0 100% self.assertEqual(self.line_count(report), 3) self.assertNotIn("/coverage/", report) - self.assertNotIn("/tests/modules/covmod1 ", report) - self.assertNotIn("/tests/zipmods.zip/covmodzip1 ", report) - self.assertIn("mycode ", report) - self.assertEqual(self.last_line_squeezed(report), "mycode 4 0 100%") + self.assertNotIn("/tests/modules/covmod1.py ", report) + self.assertNotIn("/tests/zipmods.zip/covmodzip1.py ", report) + self.assertIn("mycode.py ", report) + self.assertEqual(self.last_line_squeezed(report), "mycode.py 4 0 100%") def test_report_wildcard(self): # Try reporting using wildcards to get the modules. self.run_command("coverage run mycode.py") report = self.report_from_command("coverage report my*.py") - # Name Stmts Miss Cover - # ---------------------------- - # mycode 4 0 100% + # Name Stmts Miss Cover + # ------------------------------- + # mycode.py 4 0 100% self.assertEqual(self.line_count(report), 3) self.assertNotIn("/coverage/", report) - self.assertNotIn("/tests/modules/covmod1 ", report) - self.assertNotIn("/tests/zipmods.zip/covmodzip1 ", report) - self.assertIn("mycode ", report) - self.assertEqual(self.last_line_squeezed(report), "mycode 4 0 100%") + self.assertNotIn("/tests/modules/covmod1.py ", report) + self.assertNotIn("/tests/zipmods.zip/covmodzip1.py ", report) + self.assertIn("mycode.py ", report) + self.assertEqual(self.last_line_squeezed(report), "mycode.py 4 0 100%") def test_report_omitting(self): # Try reporting while omitting some modules @@ -80,32 +80,32 @@ class SummaryTest(CoverageTest): "coverage report --omit '%s/*'" % prefix ) - # Name Stmts Miss Cover - # ---------------------------- - # mycode 4 0 100% + # Name Stmts Miss Cover + # ------------------------------- + # mycode.py 4 0 100% self.assertEqual(self.line_count(report), 3) self.assertNotIn("/coverage/", report) - self.assertNotIn("/tests/modules/covmod1 ", report) - self.assertNotIn("/tests/zipmods.zip/covmodzip1 ", report) - self.assertIn("mycode ", report) - self.assertEqual(self.last_line_squeezed(report), "mycode 4 0 100%") + self.assertNotIn("/tests/modules/covmod1.py ", report) + self.assertNotIn("/tests/zipmods.zip/covmodzip1.py ", report) + self.assertIn("mycode.py ", report) + self.assertEqual(self.last_line_squeezed(report), "mycode.py 4 0 100%") def test_report_including(self): # Try reporting while including some modules self.run_command("coverage run mycode.py") report = self.report_from_command("coverage report --include=mycode*") - # Name Stmts Miss Cover - # ---------------------------- - # mycode 4 0 100% + # Name Stmts Miss Cover + # ------------------------------- + # mycode.py 4 0 100% self.assertEqual(self.line_count(report), 3) self.assertNotIn("/coverage/", report) - self.assertNotIn("/tests/modules/covmod1 ", report) - self.assertNotIn("/tests/zipmods.zip/covmodzip1 ", report) - self.assertIn("mycode ", report) - self.assertEqual(self.last_line_squeezed(report), "mycode 4 0 100%") + self.assertNotIn("/tests/modules/covmod1.py ", report) + self.assertNotIn("/tests/zipmods.zip/covmodzip1.py ", report) + self.assertIn("mycode.py ", report) + self.assertEqual(self.last_line_squeezed(report), "mycode.py 4 0 100%") def test_report_branches(self): self.make_file("mybranch.py", """\ @@ -119,14 +119,14 @@ class SummaryTest(CoverageTest): self.assertEqual(out, 'x\n') report = self.report_from_command("coverage report") - # Name Stmts Miss Branch BrPart Cover - # -------------------------------------------- - # mybranch 5 0 2 1 85% + # Name Stmts Miss Branch BrPart Cover + # ----------------------------------------------- + # mybranch.py 5 0 2 1 85% self.assertEqual(self.line_count(report), 3) - self.assertIn("mybranch ", report) + self.assertIn("mybranch.py ", report) self.assertEqual(self.last_line_squeezed(report), - "mybranch 5 0 2 1 86%") + "mybranch.py 5 0 2 1 86%") def test_report_show_missing(self): self.make_file("mymissing.py", """\ @@ -149,14 +149,14 @@ class SummaryTest(CoverageTest): self.assertEqual(out, 'y\nz\n') report = self.report_from_command("coverage report --show-missing") - # Name Stmts Miss Cover Missing - # ----------------------------------------- - # mymissing 14 3 79% 3-4, 10 + # Name Stmts Miss Cover Missing + # -------------------------------------------- + # mymissing.py 14 3 79% 3-4, 10 self.assertEqual(self.line_count(report), 3) - self.assertIn("mymissing ", report) + self.assertIn("mymissing.py ", report) self.assertEqual(self.last_line_squeezed(report), - "mymissing 14 3 79% 3-4, 10") + "mymissing.py 14 3 79% 3-4, 10") def test_report_show_missing_branches(self): self.make_file("mybranch.py", """\ @@ -172,14 +172,14 @@ class SummaryTest(CoverageTest): self.assertEqual(out, 'x\ny\n') report = self.report_from_command("coverage report --show-missing") - # Name Stmts Miss Branch BrPart Cover Missing - # ------------------------------------------------------- - # mybranch 7 0 4 2 82% 2->4, 4->6 + # Name Stmts Miss Branch BrPart Cover Missing + # ---------------------------------------------------------- + # mybranch.py 7 0 4 2 82% 2->4, 4->6 self.assertEqual(self.line_count(report), 3) - self.assertIn("mybranch ", report) + self.assertIn("mybranch.py ", report) self.assertEqual(self.last_line_squeezed(report), - "mybranch 7 0 4 2 82% 2->4, 4->6") + "mybranch.py 7 0 4 2 82% 2->4, 4->6") def test_report_show_missing_branches_and_lines(self): self.make_file("main.py", """\ @@ -201,22 +201,22 @@ class SummaryTest(CoverageTest): self.assertEqual(out, 'x\ny\n') report = self.report_from_command("coverage report --show-missing") - # Name Stmts Miss Branch BrPart Cover Missing - # ------------------------------------------------------- - # main 1 0 0 0 100% - # mybranch 10 2 8 3 61% 7-8, 2->4, 4->6, 6->7 - # ------------------------------------------------------- - # TOTAL 11 2 8 3 63% + # Name Stmts Miss Branch BrPart Cover Missing + # ---------------------------------------------------------- + # main.py 1 0 0 0 100% + # mybranch.py 10 2 8 3 61% 7-8, 2->4, 4->6, 6->7 + # ---------------------------------------------------------- + # TOTAL 11 2 8 3 63% self.assertEqual(self.line_count(report), 6) squeezed = self.squeezed_lines(report) self.assertEqual( squeezed[2], - "main 1 0 0 0 100%" + "main.py 1 0 0 0 100%" ) self.assertEqual( squeezed[3], - "mybranch 10 2 8 3 61% 7-8, 2->4, 4->6, 6->7" + "mybranch.py 10 2 8 3 61% 7-8, 2->4, 4->6, 6->7" ) self.assertEqual( squeezed[5], @@ -239,13 +239,13 @@ class SummaryTest(CoverageTest): self.assertEqual(out, "z\n") report = self.report_from_command("coverage report --skip-covered") - # Name Stmts Miss Cover - # --------------------------------- - # not_covered 2 1 50% + # Name Stmts Miss Cover + # ------------------------------------ + # not_covered.py 2 1 50% self.assertEqual(self.line_count(report), 3, report) squeezed = self.squeezed_lines(report) - self.assertEqual(squeezed[2], "not_covered 2 1 50%") + self.assertEqual(squeezed[2], "not_covered.py 2 1 50%") def test_report_skip_covered_branches(self): self.make_file("main.py", """ @@ -267,13 +267,13 @@ class SummaryTest(CoverageTest): self.assertEqual(out, "n\nz\n") report = self.report_from_command("coverage report --skip-covered") - # Name Stmts Miss Branch BrPart Cover - # ----------------------------------------------- - # not_covered 4 0 2 1 83% + # Name Stmts Miss Branch BrPart Cover + # -------------------------------------------------- + # not_covered.py 4 0 2 1 83% self.assertEqual(self.line_count(report), 3, report) squeezed = self.squeezed_lines(report) - self.assertEqual(squeezed[2], "not_covered 4 0 2 1 83%") + self.assertEqual(squeezed[2], "not_covered.py 4 0 2 1 83%") def test_report_skip_covered_branches_with_totals(self): self.make_file("main.py", """ @@ -300,17 +300,17 @@ class SummaryTest(CoverageTest): self.assertEqual(out, "n\nz\n") report = self.report_from_command("coverage report --skip-covered") - # Name Stmts Miss Branch BrPart Cover - # ----------------------------------------------- - # also_not_run 2 1 0 0 50% - # not_covered 4 0 2 1 83% - # ----------------------------------------------- - # TOTAL 6 1 2 1 75% + # Name Stmts Miss Branch BrPart Cover + # -------------------------------------------------- + # also_not_run.py 2 1 0 0 50% + # not_covered.py 4 0 2 1 83% + # -------------------------------------------------- + # TOTAL 6 1 2 1 75% self.assertEqual(self.line_count(report), 6, report) squeezed = self.squeezed_lines(report) - self.assertEqual(squeezed[2], "also_not_run 2 1 0 0 50%") - self.assertEqual(squeezed[3], "not_covered 4 0 2 1 83%") + self.assertEqual(squeezed[2], "also_not_run.py 2 1 0 0 50%") + self.assertEqual(squeezed[3], "not_covered.py 4 0 2 1 83%") self.assertEqual(squeezed[5], "TOTAL 6 1 2 1 75%") def test_dotpy_not_python(self): @@ -332,7 +332,7 @@ class SummaryTest(CoverageTest): # The actual error message varies version to version last = re.sub(r": '.*' at", ": 'error' at", last) self.assertEqual(last, - "mycode NotPython: " + "mycode.py NotPython: " "Couldn't parse 'mycode.py' as Python source: " "'error' at line 1" ) @@ -390,7 +390,7 @@ class SummaryTest(CoverageTest): import main # pragma: nested # pylint: disable=import-error,unused-variable cov.stop() # pragma: nested report = self.get_report(cov).splitlines() - self.assertIn("mybranch 5 5 2 0 0%", report) + self.assertIn("mybranch.py 5 5 2 0 0%", report) def run_TheCode_and_report_it(self): """A helper for the next few tests.""" @@ -467,8 +467,8 @@ class SummaryTest2(CoverageTest): report = repout.getvalue().replace('\\', '/') report = re.sub(r"\s+", " ", report) - self.assertIn("tests/modules/pkg1/__init__ 1 0 100%", report) - self.assertIn("tests/modules/pkg2/__init__ 0 0 100%", report) + self.assertIn("tests/modules/pkg1/__init__.py 1 0 100%", report) + self.assertIn("tests/modules/pkg2/__init__.py 0 0 100%", report) class ReportingReturnValueTest(CoverageTest): -- cgit v1.2.1