update for tests

This commit is contained in:
InspectorCaracal 2022-10-05 17:08:37 -06:00
parent 7bbd78acf2
commit 98284b106d
2 changed files with 5 additions and 8 deletions

View file

@ -27,7 +27,7 @@ viewpoint/pronouns Subject Object Possessive Possessive Reflexive
"""
from evennia.utils.utils import copy_word_case, is_iter
DEFAULT_PRONOUN_TYPE = "object pronoun"
DEFAULT_PRONOUN_TYPE = "subject pronoun"
DEFAULT_VIEWPOINT = "2nd person"
DEFAULT_GENDER = "neutral"
@ -99,7 +99,7 @@ PRONOUN_MAPPING = {
"male": "his",
"female": "her",
"neutral": "its",
"plural": "theirs"
"plural": "their"
},
"possessive pronoun": {
"male": "his",
@ -185,7 +185,7 @@ PRONOUN_TABLE = {
),
"yourself": (
"2nd person",
GENDERS,
("neutral", "male", "female"),
"reflexive pronoun"
),
"yourselves": (
@ -304,7 +304,7 @@ ALIASES = {
def pronoun_to_viewpoints(
pronoun, options=None, pronoun_type="object pronoun", gender="neutral", viewpoint="2nd person"
pronoun, options=None, pronoun_type=DEFAULT_PRONOUN_TYPE, gender=DEFAULT_GENDER, viewpoint=DEFAULT_VIEWPOINT
):
"""
Access function for determining the forms of a pronount from different viewpoints.
@ -404,7 +404,6 @@ def pronoun_to_viewpoints(
pronouns = viewpoint_map[pronoun_type]
else:
pronouns = viewpoint_map[DEFAULT_PRONOUN_TYPE]
if gender in pronouns:
mapped_pronoun = pronouns[gender]
else:

View file

@ -279,7 +279,7 @@ class TestPronounMapping(TestCase):
("you", "m", "you", "he"),
("you", "f op", "you", "her"),
("I", "", "I", "it"),
("I", "p", "I", "it"), # plural is invalid
("I", "p", "I", "they"),
("I", "m", "I", "he"),
("Me", "n", "Me", "It"),
("your", "p", "your", "their"),
@ -295,7 +295,6 @@ class TestPronounMapping(TestCase):
("her", "p", "you", "her"),
("her", "pa", "your", "her"),
("their", "pa", "your", "their"),
("their", "pa", "your", "their"),
("itself", "", "yourself", "itself"),
("themselves", "", "yourselves", "themselves"),
("herself", "", "yourself", "herself"),
@ -311,6 +310,5 @@ class TestPronounMapping(TestCase):
received_1st_or_2nd_person, received_3rd_person = pronouns.pronoun_to_viewpoints(
pronoun, options
)
self.assertEqual(expected_1st_or_2nd_person, received_1st_or_2nd_person)
self.assertEqual(expected_3rd_person, received_3rd_person)