Skip to content

Commit 48bbae0

Browse files
committed
Merge branch 'mac-head' into topic/GR-14972-coverage
2 parents 71dcb1e + ddcef92 commit 48bbae0

File tree

86 files changed

+1651
-2355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1651
-2355
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_tagged_unittests.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def fun():
100100

101101
executable = sys.executable.split(" ") # HACK: our sys.executable on Java is a cmdline
102102
re_success = re.compile("(test\S+) \(([^\s]+)\) \.\.\. ok$", re.MULTILINE)
103+
re_failure = re.compile("(test\S+) \(([^\s]+)\) \.\.\. (?:ERROR|FAIL)$", re.MULTILINE)
103104
kwargs = {"stdout": subprocess.PIPE, "stderr": subprocess.PIPE, "text": True, "check": False}
104105

105106
glob_pattern = os.path.join(os.path.dirname(test.__file__), "test_*.py")
@@ -169,15 +170,15 @@ def fun():
169170
# we failed the first run, create a tag file with the passing
170171
# tests (if any)
171172
passing_tests = []
172-
173-
try:
174-
imported_test_module = __import__(testmod)
175-
except:
176-
imported_test_module = None
173+
failed_tests = []
177174

178175
def get_pass_name(funcname, classname):
179-
# try hard to get a most specific pattern
180-
if imported_test_module:
176+
try:
177+
imported_test_module = __import__(testmod)
178+
except:
179+
imported_test_module = None
180+
else:
181+
# try hard to get a most specific pattern
181182
classname = "".join(classname.rpartition(testmod)[1:])
182183
clazz = imported_test_module
183184
path_to_class = classname.split(".")[1:]
@@ -191,13 +192,24 @@ def get_pass_name(funcname, classname):
191192

192193
# n.b.: we add a '*' in the front, so that unittests doesn't add
193194
# its own asterisks, because now this is already a pattern
195+
196+
for funcname,classname in re_failure.findall(p.stdout):
197+
failed_tests.append("*" + get_pass_name(funcname, classname))
198+
for funcname,classname in re_failure.findall(p.stderr):
199+
failed_tests.append("*" + get_pass_name(funcname, classname))
200+
194201
for funcname,classname in re_success.findall(p.stdout):
195202
passing_tests.append("*" + get_pass_name(funcname, classname))
196203
for funcname,classname in re_success.findall(p.stderr):
197204
passing_tests.append("*" + get_pass_name(funcname, classname))
198205

206+
# n.b.: unittests uses the __qualname__ of the function as
207+
# pattern, which we're trying to do as well. however, sometimes
208+
# the same function is shared in multiple test classes, and
209+
# fails in some. so we always subtract the failed patterns from
210+
# the passed patterns
199211
with open(tagfile, "w") as f:
200-
for passing_test in passing_tests:
212+
for passing_test in set(passing_tests) - set(failed_tests):
201213
f.write(passing_test)
202214
f.write("\n")
203215
if not passing_tests:

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/doctest_aliases.txt

Whitespace-only changes.

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/sample_doctest_no_docstrings.txt

Whitespace-only changes.

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/sample_doctest_no_doctests.txt

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*wrapper
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
test_decode
1+
*LegacyBase64TestCase.test_decode
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
test_b2a_base64_newline
2-
test_b2a_base64_newline
3-
test_b2a_base64_newline
1+
*BinASCIITest.test_b2a_base64_newline
Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +0,0 @@
1-
test_backcompatibility
2-
test_keyword_args
3-
test_large_pyrange
4-
test_large_range
5-
test_negative_lo
6-
test_optionalSlicing
7-
test_precomputed
8-
test_random
9-
test_backcompatibility
10-
test_listDerived
11-
test_arg_parsing
12-
test_cmp_err
13-
test_get_only
14-
test_len_only
15-
test_non_sequence
16-
test_colors
17-
test_grades
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
test_blocked
2-
test_callable
3-
test_contains
4-
test_convert
5-
test_fileclosed
6-
test_float
1+
*BoolTest.test_blocked
2+
*BoolTest.test_callable
3+
*BoolTest.test_contains
4+
*BoolTest.test_convert
5+
*BoolTest.test_fileclosed
6+
*BoolTest.test_float

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_buffer.txt

Whitespace-only changes.
Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
1-
test_basics
2-
test_compare_to_str
3-
test_concat
4-
test_constructor_value_errors
5-
test_copy
6-
test_empty_sequence
7-
test_extended_getslice
8-
test_from_int
9-
test_from_list
10-
test_from_ssize
11-
test_getslice
12-
test_join
13-
test_maketrans
14-
test_basics
15-
test_compare_to_str
16-
test_concat
17-
test_constructor_value_errors
18-
test_copy
19-
test_empty_sequence
20-
test_extended_getslice
21-
test_from_int
22-
test_from_list
23-
test_from_ssize
24-
test_getslice
25-
test_join
26-
test_maketrans
27-
test_join
28-
test_copy
29-
test_join
1+
*BaseBytesTest.test_basics
2+
*BaseBytesTest.test_compare_to_str
3+
*BaseBytesTest.test_concat
4+
*BaseBytesTest.test_constructor_value_errors
5+
*BaseBytesTest.test_copy
6+
*BaseBytesTest.test_empty_sequence
7+
*BaseBytesTest.test_extended_getslice
8+
*BaseBytesTest.test_from_int
9+
*BaseBytesTest.test_from_list
10+
*BaseBytesTest.test_from_ssize
11+
*BaseBytesTest.test_getslice
12+
*BaseBytesTest.test_join
13+
*BaseBytesTest.test_maketrans
14+
*ByteArrayTest.test_copy
15+
*SubclassTest.test_join
Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
1-
test_format
2-
test_formatmonth
3-
test_formatmonthname_with_year
4-
test_formatmonthname_without_year
5-
test_formatweekheader_long
6-
test_formatweekheader_short
7-
test_output
8-
test_output_htmlcalendar_encoding_ascii
9-
test_output_htmlcalendar_encoding_utf8
10-
test_output_textcalendar
11-
test_prmonth
12-
test_prweek
13-
test_pryear
14-
test_yeardayscalendar
15-
test_days
16-
test_enumerate_weekdays
17-
test_illegal_weekday_reported
18-
test_isleap
19-
test_itermonthdays
20-
test_itermonthdays2
21-
test_itermonthdays3
22-
test_itermonthdays4
23-
test_locale_calendars
24-
test_months
25-
test_setfirstweekday
26-
test_april
27-
test_december
28-
test_february
29-
test_april
30-
test_december
31-
test_february
32-
test_timegm
33-
test_december
34-
test_february_leap
35-
test_february_nonleap
36-
test_illegal_month_reported
37-
test_january
38-
test_thirteenth_month
39-
test_zeroth_month
40-
test_no_leapdays
41-
test_no_leapdays_upper_boundary
42-
test_no_range
43-
test_one_leapday_lower_boundary
44-
test_several_leapyears_in_range
45-
test__all__
46-
test_format_year
47-
test_format_year_head
48-
test_formatmonth
49-
test_formatmonthname
50-
test_formatweek
51-
test_formatweek_head
1+
*OutputTestCase.test_format
2+
*OutputTestCase.test_formatmonth
3+
*OutputTestCase.test_formatmonthname_with_year
4+
*OutputTestCase.test_formatmonthname_without_year
5+
*OutputTestCase.test_formatweekheader_long
6+
*OutputTestCase.test_formatweekheader_short
7+
*OutputTestCase.test_output
8+
*OutputTestCase.test_output_htmlcalendar_encoding_ascii
9+
*OutputTestCase.test_output_htmlcalendar_encoding_utf8
10+
*OutputTestCase.test_output_textcalendar
11+
*OutputTestCase.test_prmonth
12+
*OutputTestCase.test_prweek
13+
*OutputTestCase.test_pryear
14+
*OutputTestCase.test_yeardayscalendar
15+
*CalendarTestCase.test_days
16+
*CalendarTestCase.test_enumerate_weekdays
17+
*CalendarTestCase.test_illegal_weekday_reported
18+
*CalendarTestCase.test_isleap
19+
*CalendarTestCase.test_itermonthdays
20+
*CalendarTestCase.test_itermonthdays2
21+
*CalendarTestCase.test_itermonthdays3
22+
*CalendarTestCase.test_itermonthdays4
23+
*CalendarTestCase.test_locale_calendars
24+
*CalendarTestCase.test_months
25+
*CalendarTestCase.test_setfirstweekday
26+
*MondayTestCase.test_april
27+
*MondayTestCase.test_december
28+
*MondayTestCase.test_february
29+
*SundayTestCase.test_april
30+
*SundayTestCase.test_december
31+
*SundayTestCase.test_february
32+
*TimegmTestCase.test_timegm
33+
*MonthRangeTestCase.test_december
34+
*MonthRangeTestCase.test_february_leap
35+
*MonthRangeTestCase.test_february_nonleap
36+
*MonthRangeTestCase.test_illegal_month_reported
37+
*MonthRangeTestCase.test_january
38+
*MonthRangeTestCase.test_thirteenth_month
39+
*MonthRangeTestCase.test_zeroth_month
40+
*LeapdaysTestCase.test_no_leapdays
41+
*LeapdaysTestCase.test_no_leapdays_upper_boundary
42+
*LeapdaysTestCase.test_no_range
43+
*LeapdaysTestCase.test_one_leapday_lower_boundary
44+
*LeapdaysTestCase.test_several_leapyears_in_range
45+
*MiscTestCase.test__all__
46+
*TestSubClassingCase.test_format_year
47+
*TestSubClassingCase.test_format_year_head
48+
*TestSubClassingCase.test_formatmonth
49+
*TestSubClassingCase.test_formatmonthname
50+
*TestSubClassingCase.test_formatweek
51+
*TestSubClassingCase.test_formatweek_head
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
test_oldargs0_0
2-
test_oldargs0_0_ext
3-
test_oldargs0_0_kw
4-
test_oldargs0_1
5-
test_oldargs0_1_ext
6-
test_oldargs0_1_kw
7-
test_oldargs0_2
8-
test_oldargs0_2_ext
9-
test_oldargs0_2_kw
10-
test_oldargs1_0
11-
test_oldargs1_0_ext
12-
test_oldargs1_0_kw
13-
test_oldargs1_1
14-
test_oldargs1_1_ext
15-
test_oldargs1_1_kw
16-
test_oldargs1_2
17-
test_oldargs1_2_ext
18-
test_oldargs1_2_kw
19-
test_varargs0
20-
test_varargs0_ext
21-
test_varargs1
22-
test_varargs1_ext
23-
test_varargs1_kw
24-
test_varargs2
25-
test_varargs2_ext
26-
test_varargs2_kw
1+
*CFunctionCalls.test_oldargs0_0
2+
*CFunctionCalls.test_oldargs0_0_ext
3+
*CFunctionCalls.test_oldargs0_0_kw
4+
*CFunctionCalls.test_oldargs0_1
5+
*CFunctionCalls.test_oldargs0_1_ext
6+
*CFunctionCalls.test_oldargs0_1_kw
7+
*CFunctionCalls.test_oldargs0_2
8+
*CFunctionCalls.test_oldargs0_2_ext
9+
*CFunctionCalls.test_oldargs0_2_kw
10+
*CFunctionCalls.test_oldargs1_0
11+
*CFunctionCalls.test_oldargs1_0_ext
12+
*CFunctionCalls.test_oldargs1_0_kw
13+
*CFunctionCalls.test_oldargs1_1
14+
*CFunctionCalls.test_oldargs1_1_ext
15+
*CFunctionCalls.test_oldargs1_1_kw
16+
*CFunctionCalls.test_oldargs1_2
17+
*CFunctionCalls.test_oldargs1_2_ext
18+
*CFunctionCalls.test_oldargs1_2_kw
19+
*CFunctionCalls.test_varargs0
20+
*CFunctionCalls.test_varargs0_ext
21+
*CFunctionCalls.test_varargs1
22+
*CFunctionCalls.test_varargs1_ext
23+
*CFunctionCalls.test_varargs1_kw
24+
*CFunctionCalls.test_varargs2
25+
*CFunctionCalls.test_varargs2_ext
26+
*CFunctionCalls.test_varargs2_kw
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
testQSAndFormData
2-
testQSAndFormDataFile
3-
testQSAndUrlEncode
4-
test_all
5-
test_deprecated_parse_qs
6-
test_deprecated_parse_qsl
7-
test_escape
8-
test_fieldstorage_as_context_manager
9-
test_fieldstorage_invalid
10-
test_fieldstorage_multipart
11-
test_fieldstorage_multipart_leading_whitespace
12-
test_fieldstorage_multipart_non_ascii
13-
test_fieldstorage_multipart_w3c
14-
test_fieldstorage_part_content_length
15-
test_fieldstorage_properties
16-
test_log
17-
test_parse_header
18-
test_parse_multipart
1+
*CgiTests.testQSAndFormData
2+
*CgiTests.testQSAndFormDataFile
3+
*CgiTests.testQSAndUrlEncode
4+
*CgiTests.test_all
5+
*CgiTests.test_deprecated_parse_qs
6+
*CgiTests.test_deprecated_parse_qsl
7+
*CgiTests.test_escape
8+
*CgiTests.test_fieldstorage_as_context_manager
9+
*CgiTests.test_fieldstorage_invalid
10+
*CgiTests.test_fieldstorage_multipart
11+
*CgiTests.test_fieldstorage_multipart_leading_whitespace
12+
*CgiTests.test_fieldstorage_multipart_non_ascii
13+
*CgiTests.test_fieldstorage_multipart_w3c
14+
*CgiTests.test_fieldstorage_part_content_length
15+
*CgiTests.test_fieldstorage_properties
16+
*CgiTests.test_log
17+
*CgiTests.test_parse_header
18+
*CgiTests.test_parse_multipart

0 commit comments

Comments
 (0)