Skip to content

Commit

Permalink
Remove remaining unit terms except for repository name (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Jul 27, 2022
1 parent 8b03530 commit f51fd8b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ RUN apk add --no-cache build-base libffi-dev; \
apk del build-base libffi-dev

COPY python/publish /action/publish
COPY python/publish_unit_test_results.py /action/
COPY python/publish_test_results.py /action/

ENTRYPOINT ["python", "/action/publish_unit_test_results.py"]
ENTRYPOINT ["python", "/action/publish_test_results.py"]
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Publish Unit Test Results'
name: 'Publish Test Results'
author: 'EnricoMi'
description: 'A GitHub Action that publishes test results on GitHub'

Expand Down
4 changes: 2 additions & 2 deletions composite/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Publish Unit Test Results'
name: 'Publish Test Results'
author: 'EnricoMi'
description: 'A GitHub Action that publishes test results on GitHub'

Expand Down Expand Up @@ -141,7 +141,7 @@ runs:
id: test-results
run: |
echo '##[group]Publish Test Results'
python3 $GITHUB_ACTION_PATH/../python/publish_unit_test_results.py
python3 $GITHUB_ACTION_PATH/../python/publish_test_results.py
echo '##[endgroup]'
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions python/test/test_action_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
hide_comments_modes, pull_request_build_modes, punctuation_space
from publish.github_action import GithubAction
from publish.unittestresults import ParsedUnitTestResults, ParseError
from publish_unit_test_results import get_conclusion, get_commit_sha, get_var, \
from publish_test_results import get_conclusion, get_commit_sha, get_var, \
get_settings, get_annotations_config, Settings, get_files, throttle_gh_request_raw, is_float, main
from test import chdir

Expand Down Expand Up @@ -489,7 +489,7 @@ def do_test_get_settings(self,
# its true behaviour is tested in get_annotations_config*
annotations_config = options.get('CHECK_RUN_ANNOTATIONS').split(',') \
if options.get('CHECK_RUN_ANNOTATIONS') is not None else []
with mock.patch('publish_unit_test_results.get_annotations_config', return_value=annotations_config) as m:
with mock.patch('publish_test_results.get_annotations_config', return_value=annotations_config) as m:
if gha is None:
gha = mock.MagicMock()
actual = get_settings(options, gha)
Expand Down Expand Up @@ -745,7 +745,7 @@ def test_get_files_include_and_exclude(self):
self.assertEqual(['file2.txt'], sorted(files))

def test_get_files_with_mock(self):
with mock.patch('publish_unit_test_results.glob') as m:
with mock.patch('publish_test_results.glob') as m:
files = get_files('*.txt\n!file1.txt')
self.assertEqual([], files)
self.assertEqual([mock.call('*.txt', recursive=True), mock.call('file1.txt', recursive=True)], m.call_args_list)
Expand All @@ -758,7 +758,7 @@ def test_throttle_gh_request_raw(self):
throttled_method = throttle_gh_request_raw(2, 5, method)

def test_request(verb: str, expected_sleep: Optional[float]):
with mock.patch('publish_unit_test_results.time.sleep') as sleep:
with mock.patch('publish_test_results.time.sleep') as sleep:
response = throttled_method('cnx', verb, 'url', 'headers', 'input')

self.assertEqual('response', response)
Expand Down Expand Up @@ -830,7 +830,7 @@ def do_raise(*args):
# if this is raised, the tested main method did not return where expected but continued
raise RuntimeError('This is not expected to be called')

with mock.patch('publish_unit_test_results.get_files') as m:
with mock.patch('publish_test_results.get_files') as m:
m.side_effect = do_raise
main(settings, gha)

Expand Down
2 changes: 1 addition & 1 deletion python/test/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import requests.exceptions
from flask import Flask, Response

from publish_unit_test_results import get_github
from publish_test_results import get_github
from publish.github_action import GithubAction


Expand Down

0 comments on commit f51fd8b

Please sign in to comment.