Skip to content

Commit

Permalink
Replace ✖️ with ❌ (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber committed Oct 16, 2020
1 parent 3fefb1a commit de7f7f0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions publish_unit_test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def get_short_summary_md(stats: Dict[str, Any]) -> str:
tests=as_stat_number(stats.get('tests'), 0, 0, 'tests'),
tests_succ=as_stat_number(stats.get('tests_succ'), 0, 0, ':heavy_check_mark:'),
tests_skip=as_stat_number(stats.get('tests_skip'), 0, 0, ':zzz:'),
tests_fail=as_stat_number(stats.get('tests_fail'), 0, 0, ':heavy_multiplication_x:'),
tests_fail=as_stat_number(stats.get('tests_fail'), 0, 0, ':x:'),
tests_error=as_stat_number(stats.get('tests_error'), 0, 0, ':fire:'),
))
return md
Expand Down Expand Up @@ -388,7 +388,7 @@ def get_long_summary_md(stats: Dict[str, Any]) -> str:
tests=as_stat_number(tests, files_digits, files_delta_digits, 'tests'),
tests_succ=as_stat_number(tests_succ, success_digits, success_delta_digits, ':heavy_check_mark:'),
tests_skip=as_stat_number(tests_skip, skip_digits, skip_delta_digits, ':zzz:'),
tests_fail=as_stat_number(tests_fail, fail_digits, fail_delta_digits, ':heavy_multiplication_x:'),
tests_fail=as_stat_number(tests_fail, fail_digits, fail_delta_digits, ':x:'),
tests_error_part=tests_error_part
)

Expand All @@ -399,7 +399,7 @@ def get_long_summary_md(stats: Dict[str, Any]) -> str:
runs=as_stat_number(runs, files_digits, files_delta_digits, 'runs '),
runs_succ=as_stat_number(runs_succ, success_digits, success_delta_digits, ':heavy_check_mark:'),
runs_skip=as_stat_number(runs_skip, skip_digits, skip_delta_digits, ':zzz:'),
runs_fail=as_stat_number(runs_fail, fail_digits, fail_delta_digits, ':heavy_multiplication_x:'),
runs_fail=as_stat_number(runs_fail, fail_digits, fail_delta_digits, ':x:'),
runs_error_part=runs_error_part,
)

Expand Down
44 changes: 22 additions & 22 deletions test/test_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,28 +855,28 @@ def do_test_get_short_summary_md(self, stats, expected_md):

def test_get_short_summary_md(self):
self.do_test_get_short_summary_md(dict(
), ('N/A tests N/A :heavy_check_mark: N/A :zzz: N/A :heavy_multiplication_x: N/A :fire:'))
), ('N/A tests N/A :heavy_check_mark: N/A :zzz: N/A :x: N/A :fire:'))

self.do_test_get_short_summary_md(dict(
files=1, suites=2, duration=3,
tests=4, tests_succ=5, tests_skip=6, tests_fail=7, tests_error=8,
runs=9, runs_succ=10, runs_skip=11, runs_fail=12, runs_error=13
), ('4 tests 5 :heavy_check_mark: 6 :zzz: 7 :heavy_multiplication_x: 8 :fire:'))
), ('4 tests 5 :heavy_check_mark: 6 :zzz: 7 :x: 8 :fire:'))

self.do_test_get_short_summary_md(dict(
files=n(1, 2), suites=n(2, -3), duration=d(3, 4),
tests=n(4, -5), tests_succ=n(5, 6), tests_skip=n(6, -7), tests_fail=n(7, 8), tests_error=n(8, -9),
runs=n(9, 10), runs_succ=n(10, -11), runs_skip=n(11, 12), runs_fail=n(12, -13), runs_error=n(13, 14),
reference_type='type', reference_commit='0123456789abcdef'
), ('4 tests -5  5 :heavy_check_mark: +6  6 :zzz: -7  7 :heavy_multiplication_x: +8  8 :fire: -9 '))
), ('4 tests -5  5 :heavy_check_mark: +6  6 :zzz: -7  7 :x: +8  8 :fire: -9 '))

def do_test_get_long_summary_md(self, stats, expected_md):
self.assertEqual(get_long_summary_md(stats), expected_md)

def test_get_long_summary_md(self):
self.do_test_get_long_summary_md(dict(
), ('N/A files  N/A suites   N/A :stopwatch:\n'
'N/A tests N/A :heavy_check_mark: N/A :zzz: N/A :heavy_multiplication_x:\n'
'N/A tests N/A :heavy_check_mark: N/A :zzz: N/A :x:\n'
'\n'
'results for commit None\n'))

Expand All @@ -885,7 +885,7 @@ def test_get_long_summary_md(self):
tests=4, tests_succ=5, tests_skip=6, tests_fail=7, tests_error=8,
runs=4, runs_succ=5, runs_skip=6, runs_fail=7, runs_error=8
), ('1 files  2 suites   3s :stopwatch:\n'
'4 tests 5 :heavy_check_mark: 6 :zzz: 7 :heavy_multiplication_x: 8 :fire:\n'
'4 tests 5 :heavy_check_mark: 6 :zzz: 7 :x: 8 :fire:\n'
'\n'
'results for commit None\n'))

Expand All @@ -894,8 +894,8 @@ def test_get_long_summary_md(self):
tests=4, tests_succ=5, tests_skip=6, tests_fail=7, tests_error=0,
runs=9, runs_succ=10, runs_skip=11, runs_fail=12, runs_error=0
), ('1 files    2 suites   3s :stopwatch:\n'
'4 tests   5 :heavy_check_mark:   6 :zzz:   7 :heavy_multiplication_x:\n'
'9 runs  10 :heavy_check_mark: 11 :zzz: 12 :heavy_multiplication_x:\n'
'4 tests   5 :heavy_check_mark:   6 :zzz:   7 :x:\n'
'9 runs  10 :heavy_check_mark: 11 :zzz: 12 :x:\n'
'\n'
'results for commit None\n'))

Expand All @@ -904,8 +904,8 @@ def test_get_long_summary_md(self):
tests=4, tests_succ=5, tests_skip=6, tests_fail=7, tests_error=8,
runs=9, runs_succ=10, runs_skip=11, runs_fail=12, runs_error=13
), ('1 files    2 suites   3s :stopwatch:\n'
'4 tests   5 :heavy_check_mark:   6 :zzz:   7 :heavy_multiplication_x:   8 :fire:\n'
'9 runs  10 :heavy_check_mark: 11 :zzz: 12 :heavy_multiplication_x: 13 :fire:\n'
'4 tests   5 :heavy_check_mark:   6 :zzz:   7 :x:   8 :fire:\n'
'9 runs  10 :heavy_check_mark: 11 :zzz: 12 :x: 13 :fire:\n'
'\n'
'results for commit None\n'))

Expand All @@ -915,15 +915,15 @@ def test_get_long_summary_md(self):
runs=n(9, 10), runs_succ=n(10, -11), runs_skip=n(11, 12), runs_fail=n(12, -13), runs_error=n(13, 14),
commit='123456789abcdef0', reference_type='type', reference_commit='0123456789abcdef'
), ('1 files  +  2    2 suites  -3   3s :stopwatch: +4s\n'
'4 tests -  5    5 :heavy_check_mark: +  6    6 :zzz: -  7    7 :heavy_multiplication_x: +  8    8 :fire: -  9 \n'
'9 runs  +10  10 :heavy_check_mark: -11  11 :zzz: +12  12 :heavy_multiplication_x: -13  13 :fire: +14 \n'
'4 tests -  5    5 :heavy_check_mark: +  6    6 :zzz: -  7    7 :x: +  8    8 :fire: -  9 \n'
'9 runs  +10  10 :heavy_check_mark: -11  11 :zzz: +12  12 :x: -13  13 :fire: +14 \n'
'\n'
'results for commit 12345678 ± comparison against type commit 01234567\n'))

def test_get_long_summary_with_digest_md(self):
self.assertTrue(get_long_summary_with_digest_md(dict(
)).startswith('N/A files  N/A suites   N/A :stopwatch:\n'
'N/A tests N/A :heavy_check_mark: N/A :zzz: N/A :heavy_multiplication_x:\n'
'N/A tests N/A :heavy_check_mark: N/A :zzz: N/A :x:\n'
'\n'
'results for commit None\n'
'\n'
Expand All @@ -934,7 +934,7 @@ def test_get_long_summary_with_digest_md(self):
tests=4, tests_succ=5, tests_skip=6, tests_fail=7, tests_error=8,
runs=4, runs_succ=5, runs_skip=6, runs_fail=7, runs_error=8
)).startswith('1 files  2 suites   3s :stopwatch:\n'
'4 tests 5 :heavy_check_mark: 6 :zzz: 7 :heavy_multiplication_x: 8 :fire:\n'
'4 tests 5 :heavy_check_mark: 6 :zzz: 7 :x: 8 :fire:\n'
'\n'
'results for commit None\n'
'\n'
Expand All @@ -945,8 +945,8 @@ def test_get_long_summary_with_digest_md(self):
tests=4, tests_succ=5, tests_skip=6, tests_fail=7, tests_error=0,
runs=9, runs_succ=10, runs_skip=11, runs_fail=12, runs_error=0
)).startswith('1 files    2 suites   3s :stopwatch:\n'
'4 tests   5 :heavy_check_mark:   6 :zzz:   7 :heavy_multiplication_x:\n'
'9 runs  10 :heavy_check_mark: 11 :zzz: 12 :heavy_multiplication_x:\n'
'4 tests   5 :heavy_check_mark:   6 :zzz:   7 :x:\n'
'9 runs  10 :heavy_check_mark: 11 :zzz: 12 :x:\n'
'\n'
'results for commit None\n'
'\n'
Expand All @@ -957,8 +957,8 @@ def test_get_long_summary_with_digest_md(self):
tests=4, tests_succ=5, tests_skip=6, tests_fail=7, tests_error=8,
runs=9, runs_succ=10, runs_skip=11, runs_fail=12, runs_error=13
)).startswith('1 files    2 suites   3s :stopwatch:\n'
'4 tests   5 :heavy_check_mark:   6 :zzz:   7 :heavy_multiplication_x:   8 :fire:\n'
'9 runs  10 :heavy_check_mark: 11 :zzz: 12 :heavy_multiplication_x: 13 :fire:\n'
'4 tests   5 :heavy_check_mark:   6 :zzz:   7 :x:   8 :fire:\n'
'9 runs  10 :heavy_check_mark: 11 :zzz: 12 :x: 13 :fire:\n'
'\n'
'results for commit None\n'
'\n'
Expand All @@ -970,8 +970,8 @@ def test_get_long_summary_with_digest_md(self):
runs=n(9, 10), runs_succ=n(10, -11), runs_skip=n(11, 12), runs_fail=n(12, -13), runs_error=n(13, 14),
commit='123456789abcdef0', reference_type='type', reference_commit='0123456789abcdef'
)).startswith('1 files  +  2    2 suites  -3   3s :stopwatch: +4s\n'
'4 tests -  5    5 :heavy_check_mark: +  6    6 :zzz: -  7    7 :heavy_multiplication_x: +  8    8 :fire: -  9 \n'
'9 runs  +10  10 :heavy_check_mark: -11  11 :zzz: +12  12 :heavy_multiplication_x: -13  13 :fire: +14 \n'
'4 tests -  5    5 :heavy_check_mark: +  6    6 :zzz: -  7    7 :x: +  8    8 :fire: -  9 \n'
'9 runs  +10  10 :heavy_check_mark: -11  11 :zzz: +12  12 :x: -13  13 :fire: +14 \n'
'\n'
'results for commit 12345678 ± comparison against type commit 01234567\n'
'\n'
Expand Down Expand Up @@ -1311,8 +1311,8 @@ def test_files(self):
stats = get_stats(results)
md = get_long_summary_md(stats)
self.assertEqual(md, ('  10 files    10 suites   39m 1s :stopwatch:\n'
'217 tests 208 :heavy_check_mark:   9 :zzz: 0 :heavy_multiplication_x:\n'
'373 runs  333 :heavy_check_mark: 40 :zzz: 0 :heavy_multiplication_x:\n'
'217 tests 208 :heavy_check_mark:   9 :zzz: 0 :x:\n'
'373 runs  333 :heavy_check_mark: 40 :zzz: 0 :x:\n'
'\n'
'results for commit example\n'))

Expand All @@ -1323,7 +1323,7 @@ def test_empty_file(self):
stats = get_stats(results)
md = get_long_summary_md(stats)
self.assertEqual(md, ('1 files  1 suites   0s :stopwatch:\n'
'0 tests 0 :heavy_check_mark: 0 :zzz: 0 :heavy_multiplication_x:\n'
'0 tests 0 :heavy_check_mark: 0 :zzz: 0 :x:\n'
'\n'
'results for commit a commit\n'))

Expand Down

0 comments on commit de7f7f0

Please sign in to comment.