Fixing tests
This commit is contained in:
parent
8aa88feae3
commit
c51e19fea2
|
@ -124,18 +124,6 @@ import org.junit.jupiter.api.DisplayName;
|
||||||
public void zkBinderContextImplPropagatesLotFieldsDirectlyFromUnderlyingZkBinderContext()
|
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 = [
|
JAVADOC_TO_DISPLAYNAME = [
|
||||||
(INPUT_1, OUTPUT_1),
|
(INPUT_1, OUTPUT_1),
|
||||||
(INPUT_2, OUTPUT_2),
|
(INPUT_2, OUTPUT_2),
|
||||||
|
@ -145,7 +133,6 @@ JAVADOC_TO_DISPLAYNAME = [
|
||||||
(INPUT_5B, OUTPUT_5),
|
(INPUT_5B, OUTPUT_5),
|
||||||
(INPUT_5C, OUTPUT_5),
|
(INPUT_5C, OUTPUT_5),
|
||||||
(INPUT_5D, 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,
|
with_display_name=True,
|
||||||
only_for_javadoc = False,
|
only_for_javadoc = False,
|
||||||
only_for_display_name = False,
|
only_for_display_name = False,
|
||||||
|
only_for_todo = False,
|
||||||
naming_scheme=NamingScheme.FROM_DESC,
|
naming_scheme=NamingScheme.FROM_DESC,
|
||||||
)
|
)
|
||||||
converted = standardize_java_text(inp.strip(), config)
|
converted = standardize_java_text(inp.strip(), config)
|
||||||
|
|
34
test/test_standardize_from_todo.py
Normal file
34
test/test_standardize_from_todo.py
Normal 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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user