1
0

Fixing tests
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 23s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 21s

This commit is contained in:
Jon Michael Aanes 2025-04-15 10:46:10 +02:00
parent 8aa88feae3
commit c51e19fea2
2 changed files with 35 additions and 13 deletions

View File

@ -124,18 +124,6 @@ import org.junit.jupiter.api.DisplayName;
public void zkBinderContextImplPropagatesLotFieldsDirectlyFromUnderlyingZkBinderContext()
"""
INPUT_6 = """
/** Fail when uploading the wrong share */
@ContractTest(previous = "registerSharing")
void TODO2() {
"""
OUTPUT_6 = """
/** Fail when uploading the wrong share */
@ContractTest(previous = "registerSharing")
void failWhenUploadingTheWrongShare() {
"""
JAVADOC_TO_DISPLAYNAME = [
(INPUT_1, OUTPUT_1),
(INPUT_2, OUTPUT_2),
@ -145,7 +133,6 @@ JAVADOC_TO_DISPLAYNAME = [
(INPUT_5B, OUTPUT_5),
(INPUT_5C, OUTPUT_5),
(INPUT_5D, OUTPUT_5),
(INPUT_6, OUTPUT_6),
]
@ -156,6 +143,7 @@ def test_javadoc_to_displayname(inp: str, output: str):
with_display_name=True,
only_for_javadoc = False,
only_for_display_name = False,
only_for_todo = False,
naming_scheme=NamingScheme.FROM_DESC,
)
converted = standardize_java_text(inp.strip(), config)

View File

@ -0,0 +1,34 @@
import pytest
from standardize_test_format import NamingScheme, standardize_java_text, Config
INPUT_6 = """
/** Fail when uploading the wrong share */
@ContractTest(previous = "registerSharing")
void TODO2() {
"""
OUTPUT_6 = """
/** Fail when uploading the wrong share */
@ContractTest(previous = "registerSharing")
void failWhenUploadingTheWrongShare() {
"""
NAME_FROM_COMMENT = [
(INPUT_6, OUTPUT_6),
]
@pytest.mark.parametrize(('inp','output'), NAME_FROM_COMMENT)
def test_javadoc_to_displayname(inp: str, output: str):
config = Config(
with_javadoc=True,
with_display_name=False,
only_for_javadoc = False,
only_for_display_name = False,
only_for_todo = True,
naming_scheme=NamingScheme.FROM_DESC,
)
converted = standardize_java_text(inp.strip(), config)
assert converted == output.strip()