Skip to content

Commit

Permalink
Fix imports in test_publisher and test_publish
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Apr 18, 2022
1 parent 6067bab commit 609b297
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
12 changes: 11 additions & 1 deletion python/test/test_publish.py
@@ -1,10 +1,20 @@
import contextlib
import locale
import unittest
from collections import defaultdict
from typing import Any

import mock

from publish import *
from publish import Annotation, UnitTestCaseResults, UnitTestRunResults, UnitTestRunDeltaResults, CaseMessages, \
get_error_annotation, get_digest_from_stats, \
all_tests_label_md, skipped_tests_label_md, failed_tests_label_md, passed_tests_label_md, test_errors_label_md, \
duration_label_md, SomeTestChanges, abbreviate, abbreviate_bytes, get_test_name, get_formatted_digits, \
get_magnitude, get_delta, as_short_commit, as_delta, as_stat_number, as_stat_duration, get_stats_from_digest, \
digest_string, ungest_string, get_short_summary, get_short_summary_md, \
get_long_summary_md, get_long_summary_with_digest_md, get_test_changes_md, get_test_changes_list_md, \
get_test_changes_summary_md, get_case_annotations, get_case_annotation, get_all_tests_list_annotation, \
get_skipped_tests_list_annotation, get_case_messages, chunk_test_list
from publish.junit import parse_junit_xml_files
from publish.unittestresults import get_stats, UnitTestCase, ParseError
from publish.unittestresults import get_test_results
Expand Down
14 changes: 11 additions & 3 deletions python/test/test_publisher.py
@@ -1,18 +1,26 @@
import itertools
import json
import os
import tempfile
import unittest
from collections.abc import Collection
from datetime import datetime, timezone
from typing import Optional, List, Mapping, Union, Any

import github.CheckRun
import mock
from github import Github, GithubException

from publish import *
from publish import comment_mode_create, comment_mode_update, comment_mode_off, comment_condition_always, \
comment_condition_changes, comment_condition_failures, comment_condition_errors, hide_comments_mode_off, \
hide_comments_mode_orphaned, hide_comments_mode_all_but_latest, Annotation, default_annotations, \
get_error_annotation, digest_header, get_digest_from_stats, \
all_tests_list, skipped_tests_list, none_list, \
all_tests_label_md, skipped_tests_label_md, failed_tests_label_md, passed_tests_label_md, test_errors_label_md, \
duration_label_md, pull_request_build_mode_merge
from publish.github_action import GithubAction
from publish.publisher import Publisher, Settings, PublishData
from publish.unittestresults import UnitTestCase, ParseError
from publish.unittestresults import UnitTestCase, ParseError, UnitTestRunResults, UnitTestRunDeltaResults, \
UnitTestCaseResults

errors = [ParseError('file', 'error', 1, 2)]

Expand Down

0 comments on commit 609b297

Please sign in to comment.