Skip to content

Commit

Permalink
Merge pull request Webperf-se#343 from cockroacher/i331
Browse files Browse the repository at this point in the history
Remaining pylint issues for Webperf-se#331
  • Loading branch information
7h3Rabbit authored Mar 25, 2024
2 parents c79f5b4 + 6d3eba8 commit 38372c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/verify_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,12 @@ def validate_translations():
This function performs two main validation steps:
1. Validates the existence and correctness of .po and .mo files in the project.
2. Validates the usage of global_translation() and local_translation() in .py files in the project.
2. Validates the usage of global_translation() and
local_translation() in .py files in the project.
The function uses the `validate_locales` function to validate .po and .mo files,
and the `validate_python_files` function to validate global_translation() and local_translation() usage.
and the `validate_python_files` function to validate global_translation() and
local_translation() usage.
Returns:
bool: True if all validations pass, False otherwise.
Expand Down
10 changes: 5 additions & 5 deletions tests/w3c_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ def get_errors(test_type, params):
arg = f'--exit-zero-always{test_arg} --stdout --format json --errors-only {file_path}'

command = f'java -jar vnu.jar {arg}'
process = subprocess.Popen(command.split(), stdout=subprocess.PIPE)
output, _ = process.communicate(timeout=REQUEST_TIMEOUT * 10)
with subprocess.Popen(command.split(), stdout=subprocess.PIPE) as process:
output, _ = process.communicate(timeout=REQUEST_TIMEOUT * 10)

json_result = json.loads(output)
if 'messages' in json_result:
errors = json_result['messages']
json_result = json.loads(output)
if 'messages' in json_result:
errors = json_result['messages']

return errors

Expand Down

0 comments on commit 38372c8

Please sign in to comment.