Skip to content

Instantly share code, notes, and snippets.

@horvatha
Last active April 14, 2024 17:49
Show Gist options
  • Save horvatha/1f898b03c79b86ff11a9a807999e4556 to your computer and use it in GitHub Desktop.
Save horvatha/1f898b03c79b86ff11a9a807999e4556 to your computer and use it in GitHub Desktop.
from test_cases import cases
from irish_possessive_golf import f
def test_all():
for i, (x, y, result) in enumerate(cases):
my_result = f(x, y)
assert my_result == result, f"{x}, {y} should give {result}, not {my_result} ({i+1})"
print("All succeeded")
test_all()
cases = [
("mé", "arán", "m'arán"),
("tú", "arán", "d'arán"),
("sí", "arán", "a harán"),
("sé", "arán", "a arán"),
("muid", "arán", "ár n-arán"),
("sibh", "arán", "bhur n-arán"),
("siad", "arán", "a n-arán"),
("mé", "bád", "mo bhád"),
("tú", "bád", "do bhád"),
("sí", "bád", "a bád"),
("sé", "bád", "a bhád"),
("muid", "bád", "ár mbád"),
("sibh", "bád", "bhur mbád"),
("siad", "bád", "a mbád"),
("mé", "bróga", "mo bhróga"),
("tú", "bróga", "do bhróga"),
("sí", "bróga", "a bróga"),
("sé", "bróga", "a bhróga"),
("muid", "bróga", "ár mbróga"),
("sibh", "bróga", "bhur mbróga"),
("siad", "bróga", "a mbróga"),
("mé", "cóta", "mo chóta"),
("tú", "cóta", "do chóta"),
("sí", "cóta", "a cóta"),
("sé", "cóta", "a chóta"),
("muid", "cóta", "ár gcóta"),
("sibh", "cóta", "bhur gcóta"),
("siad", "cóta", "a gcóta"),
("mé", "cú", "mo chú"),
("tú", "cú", "do chú"),
("sí", "cú", "a cú"),
("sé", "cú", "a chú"),
("muid", "cú", "ár gcú"),
("sibh", "cú", "bhur gcú"),
("siad", "cú", "a gcú"),
("mé", "dinnéar", "mo dhinnéar"),
("tú", "dinnéar", "do dhinnéar"),
("sí", "dinnéar", "a dinnéar"),
("sé", "dinnéar", "a dhinnéar"),
("muid", "dinnéar", "ár ndinnéar"),
("sibh", "dinnéar", "bhur ndinnéar"),
("siad", "dinnéar", "a ndinnéar"),
("mé", "earr", "m'earr"),
("tú", "earr", "d'earr"),
("sí", "earr", "a hearr"),
("sé", "earr", "a earr"),
("muid", "earr", "ár n-earr"),
("sibh", "earr", "bhur n-earr"),
("siad", "earr", "a n-earr"),
("mé", "éan", "m'éan"),
("tú", "éan", "d'éan"),
("sí", "éan", "a héan"),
("sé", "éan", "a éan"),
("muid", "éan", "ár n-éan"),
("sibh", "éan", "bhur n-éan"),
("siad", "éan", "a n-éan"),
("mé", "fia", "mo fhia"),
("tú", "fia", "do fhia"),
("sí", "fia", "a fia"),
("sé", "fia", "a fhia"),
("muid", "fia", "ár bhfia"),
("sibh", "fia", "bhur bhfia"),
("siad", "fia", "a bhfia"),
("mé", "focal", "mo fhocal"),
("tú", "focal", "do fhocal"),
("sí", "focal", "a focal"),
("sé", "focal", "a fhocal"),
("muid", "focal", "ár bhfocal"),
("sibh", "focal", "bhur bhfocal"),
("siad", "focal", "a bhfocal"),
("mé", "gúna", "mo ghúna"),
("tú", "gúna", "do ghúna"),
("sí", "gúna", "a gúna"),
("sé", "gúna", "a ghúna"),
("muid", "gúna", "ár ngúna"),
("sibh", "gúna", "bhur ngúna"),
("siad", "gúna", "a ngúna"),
("mé", "iasc", "m'iasc"),
("tú", "iasc", "d'iasc"),
("sí", "iasc", "a hiasc"),
("sé", "iasc", "a iasc"),
("muid", "iasc", "ár n-iasc"),
("sibh", "iasc", "bhur n-iasc"),
("siad", "iasc", "a n-iasc"),
("mé", "íomhá", "m'íomhá"),
("tú", "íomhá", "d'íomhá"),
("sí", "íomhá", "a híomhá"),
("sé", "íomhá", "a íomhá"),
("muid", "íomhá", "ár n-íomhá"),
("sibh", "íomhá", "bhur n-íomhá"),
("siad", "íomhá", "a n-íomhá"),
("mé", "lámh", "mo lámh"),
("tú", "lámh", "do lámh"),
("sí", "lámh", "a lámh"),
("sé", "lámh", "a lámh"),
("muid", "lámh", "ár lámh"),
("sibh", "lámh", "bhur lámh"),
("siad", "lámh", "a lámh"),
("mé", "mac", "mo mhac"),
("tú", "mac", "do mhac"),
("sí", "mac", "a mac"),
("sé", "mac", "a mhac"),
("muid", "mac", "ár mac"),
("sibh", "mac", "bhur mac"),
("siad", "mac", "a mac"),
("mé", "madra", "mo mhadra"),
("tú", "madra", "do mhadra"),
("sí", "madra", "a madra"),
("sé", "madra", "a mhadra"),
("muid", "madra", "ár madra"),
("sibh", "madra", "bhur madra"),
("siad", "madra", "a madra"),
("mé", "naíon", "mo naíon"),
("tú", "naíon", "do naíon"),
("sí", "naíon", "a naíon"),
("sé", "naíon", "a naíon"),
("muid", "naíon", "ár naíon"),
("sibh", "naíon", "bhur naíon"),
("siad", "naíon", "a naíon"),
("mé", "oifig", "m'oifig"),
("tú", "oifig", "d'oifig"),
("sí", "oifig", "a hoifig"),
("sé", "oifig", "a oifig"),
("muid", "oifig", "ár n-oifig"),
("sibh", "oifig", "bhur n-oifig"),
("siad", "oifig", "a n-oifig"),
("mé", "ól", "m'ól"),
("tú", "ól", "d'ól"),
("sí", "ól", "a hól"),
("sé", "ól", "a ól"),
("muid", "ól", "ár n-ól"),
("sibh", "ól", "bhur n-ól"),
("siad", "ól", "a n-ól"),
("mé", "portán", "mo phortán"),
("tú", "portán", "do phortán"),
("sí", "portán", "a portán"),
("sé", "portán", "a phortán"),
("muid", "portán", "ár bportán"),
("sibh", "portán", "bhur bportán"),
("siad", "portán", "a bportán"),
("mé", "rón", "mo rón"),
("tú", "rón", "do rón"),
("sí", "rón", "a rón"),
("sé", "rón", "a rón"),
("muid", "rón", "ár rón"),
("sibh", "rón", "bhur rón"),
("siad", "rón", "a rón"),
("mé", "scáth", "mo scáth"),
("tú", "scáth", "do scáth"),
("sí", "scáth", "a scáth"),
("sé", "scáth", "a scáth"),
("muid", "scáth", "ár scáth"),
("sibh", "scáth", "bhur scáth"),
("siad", "scáth", "a scáth"),
("mé", "sféar", "mo sféar"),
("tú", "sféar", "do sféar"),
("sí", "sféar", "a sféar"),
("sé", "sféar", "a sféar"),
("muid", "sféar", "ár sféar"),
("sibh", "sféar", "bhur sféar"),
("siad", "sféar", "a sféar"),
("mé", "slí", "mo shlí"),
("tú", "slí", "do shlí"),
("sí", "slí", "a slí"),
("sé", "slí", "a shlí"),
("muid", "slí", "ár slí"),
("sibh", "slí", "bhur slí"),
("siad", "slí", "a slí"),
("mé", "sméara", "mo sméara"),
("tú", "sméara", "do sméara"),
("sí", "sméara", "a sméara"),
("sé", "sméara", "a sméara"),
("muid", "sméara", "ár sméara"),
("sibh", "sméara", "bhur sméara"),
("siad", "sméara", "a sméara"),
("mé", "spíon", "mo spíon"),
("tú", "spíon", "do spíon"),
("sí", "spíon", "a spíon"),
("sé", "spíon", "a spíon"),
("muid", "spíon", "ár spíon"),
("sibh", "spíon", "bhur spíon"),
("siad", "spíon", "a spíon"),
("mé", "srón", "mo shrón"),
("tú", "srón", "do shrón"),
("sí", "srón", "a srón"),
("sé", "srón", "a shrón"),
("muid", "srón", "ár srón"),
("sibh", "srón", "bhur srón"),
("siad", "srón", "a srón"),
("mé", "stiúideo", "mo stiúideo"),
("tú", "stiúideo", "do stiúideo"),
("sí", "stiúideo", "a stiúideo"),
("sé", "stiúideo", "a stiúideo"),
("muid", "stiúideo", "ár stiúideo"),
("sibh", "stiúideo", "bhur stiúideo"),
("siad", "stiúideo", "a stiúideo"),
("mé", "sú", "mo shú"),
("tú", "sú", "do shú"),
("sí", "sú", "a sú"),
("sé", "sú", "a shú"),
("muid", "sú", "ár sú"),
("sibh", "sú", "bhur sú"),
("siad", "sú", "a sú"),
("mé", "teaghlach", "mo theaghlach"),
("tú", "teaghlach", "do theaghlach"),
("sí", "teaghlach", "a teaghlach"),
("sé", "teaghlach", "a theaghlach"),
("muid", "teaghlach", "ár dteaghlach"),
("sibh", "teaghlach", "bhur dteaghlach"),
("siad", "teaghlach", "a dteaghlach"),
("mé", "ubh", "m'ubh"),
("tú", "ubh", "d'ubh"),
("sí", "ubh", "a hubh"),
("sé", "ubh", "a ubh"),
("muid", "ubh", "ár n-ubh"),
("sibh", "ubh", "bhur n-ubh"),
("siad", "ubh", "a n-ubh"),
("mé", "úll", "m'úll"),
("tú", "úll", "d'úll"),
("sí", "úll", "a húll"),
("sé", "úll", "a úll"),
("muid", "úll", "ár n-úll"),
("sibh", "úll", "bhur n-úll"),
("siad", "úll", "a n-úll"),
("mé", "ARÁN", "M'ARÁN"),
("tú", "ARÁN", "D'ARÁN"),
("sí", "ARÁN", "A hARÁN"),
("sé", "ARÁN", "A ARÁN"),
("muid", "ARÁN", "ÁR nARÁN"),
("sibh", "ARÁN", "BHUR nARÁN"),
("siad", "ARÁN", "A nARÁN"),
("mé", "BÁD", "MO BHÁD"),
("tú", "BÁD", "DO BHÁD"),
("sí", "BÁD", "A BÁD"),
("sé", "BÁD", "A BHÁD"),
("muid", "BÁD", "ÁR mBÁD"),
("sibh", "BÁD", "BHUR mBÁD"),
("siad", "BÁD", "A mBÁD"),
("mé", "BRÓGA", "MO BHRÓGA"),
("tú", "BRÓGA", "DO BHRÓGA"),
("sí", "BRÓGA", "A BRÓGA"),
("sé", "BRÓGA", "A BHRÓGA"),
("muid", "BRÓGA", "ÁR mBRÓGA"),
("sibh", "BRÓGA", "BHUR mBRÓGA"),
("siad", "BRÓGA", "A mBRÓGA"),
("mé", "CÓTA", "MO CHÓTA"),
("tú", "CÓTA", "DO CHÓTA"),
("sí", "CÓTA", "A CÓTA"),
("sé", "CÓTA", "A CHÓTA"),
("muid", "CÓTA", "ÁR gCÓTA"),
("sibh", "CÓTA", "BHUR gCÓTA"),
("siad", "CÓTA", "A gCÓTA"),
("mé", "CÚ", "MO CHÚ"),
("tú", "CÚ", "DO CHÚ"),
("sí", "CÚ", "A CÚ"),
("sé", "CÚ", "A CHÚ"),
("muid", "CÚ", "ÁR gCÚ"),
("sibh", "CÚ", "BHUR gCÚ"),
("siad", "CÚ", "A gCÚ"),
("mé", "DINNÉAR", "MO DHINNÉAR"),
("tú", "DINNÉAR", "DO DHINNÉAR"),
("sí", "DINNÉAR", "A DINNÉAR"),
("sé", "DINNÉAR", "A DHINNÉAR"),
("muid", "DINNÉAR", "ÁR nDINNÉAR"),
("sibh", "DINNÉAR", "BHUR nDINNÉAR"),
("siad", "DINNÉAR", "A nDINNÉAR"),
("mé", "EARR", "M'EARR"),
("tú", "EARR", "D'EARR"),
("sí", "EARR", "A hEARR"),
("sé", "EARR", "A EARR"),
("muid", "EARR", "ÁR nEARR"),
("sibh", "EARR", "BHUR nEARR"),
("siad", "EARR", "A nEARR"),
("mé", "ÉAN", "M'ÉAN"),
("tú", "ÉAN", "D'ÉAN"),
("sí", "ÉAN", "A hÉAN"),
("sé", "ÉAN", "A ÉAN"),
("muid", "ÉAN", "ÁR nÉAN"),
("sibh", "ÉAN", "BHUR nÉAN"),
("siad", "ÉAN", "A nÉAN"),
("mé", "FIA", "MO FHIA"),
("tú", "FIA", "DO FHIA"),
("sí", "FIA", "A FIA"),
("sé", "FIA", "A FHIA"),
("muid", "FIA", "ÁR bhFIA"),
("sibh", "FIA", "BHUR bhFIA"),
("siad", "FIA", "A bhFIA"),
("mé", "FOCAL", "MO FHOCAL"),
("tú", "FOCAL", "DO FHOCAL"),
("sí", "FOCAL", "A FOCAL"),
("sé", "FOCAL", "A FHOCAL"),
("muid", "FOCAL", "ÁR bhFOCAL"),
("sibh", "FOCAL", "BHUR bhFOCAL"),
("siad", "FOCAL", "A bhFOCAL"),
("mé", "GÚNA", "MO GHÚNA"),
("tú", "GÚNA", "DO GHÚNA"),
("sí", "GÚNA", "A GÚNA"),
("sé", "GÚNA", "A GHÚNA"),
("muid", "GÚNA", "ÁR nGÚNA"),
("sibh", "GÚNA", "BHUR nGÚNA"),
("siad", "GÚNA", "A nGÚNA"),
("mé", "IASC", "M'IASC"),
("tú", "IASC", "D'IASC"),
("sí", "IASC", "A hIASC"),
("sé", "IASC", "A IASC"),
("muid", "IASC", "ÁR nIASC"),
("sibh", "IASC", "BHUR nIASC"),
("siad", "IASC", "A nIASC"),
("mé", "ÍOMHÁ", "M'ÍOMHÁ"),
("tú", "ÍOMHÁ", "D'ÍOMHÁ"),
("sí", "ÍOMHÁ", "A hÍOMHÁ"),
("sé", "ÍOMHÁ", "A ÍOMHÁ"),
("muid", "ÍOMHÁ", "ÁR nÍOMHÁ"),
("sibh", "ÍOMHÁ", "BHUR nÍOMHÁ"),
("siad", "ÍOMHÁ", "A nÍOMHÁ"),
("mé", "LÁMH", "MO LÁMH"),
("tú", "LÁMH", "DO LÁMH"),
("sí", "LÁMH", "A LÁMH"),
("sé", "LÁMH", "A LÁMH"),
("muid", "LÁMH", "ÁR LÁMH"),
("sibh", "LÁMH", "BHUR LÁMH"),
("siad", "LÁMH", "A LÁMH"),
("mé", "MAC", "MO MHAC"),
("tú", "MAC", "DO MHAC"),
("sí", "MAC", "A MAC"),
("sé", "MAC", "A MHAC"),
("muid", "MAC", "ÁR MAC"),
("sibh", "MAC", "BHUR MAC"),
("siad", "MAC", "A MAC"),
("mé", "MADRA", "MO MHADRA"),
("tú", "MADRA", "DO MHADRA"),
("sí", "MADRA", "A MADRA"),
("sé", "MADRA", "A MHADRA"),
("muid", "MADRA", "ÁR MADRA"),
("sibh", "MADRA", "BHUR MADRA"),
("siad", "MADRA", "A MADRA"),
("mé", "NAÍON", "MO NAÍON"),
("tú", "NAÍON", "DO NAÍON"),
("sí", "NAÍON", "A NAÍON"),
("sé", "NAÍON", "A NAÍON"),
("muid", "NAÍON", "ÁR NAÍON"),
("sibh", "NAÍON", "BHUR NAÍON"),
("siad", "NAÍON", "A NAÍON"),
("mé", "OIFIG", "M'OIFIG"),
("tú", "OIFIG", "D'OIFIG"),
("sí", "OIFIG", "A hOIFIG"),
("sé", "OIFIG", "A OIFIG"),
("muid", "OIFIG", "ÁR nOIFIG"),
("sibh", "OIFIG", "BHUR nOIFIG"),
("siad", "OIFIG", "A nOIFIG"),
("mé", "ÓL", "M'ÓL"),
("tú", "ÓL", "D'ÓL"),
("sí", "ÓL", "A hÓL"),
("sé", "ÓL", "A ÓL"),
("muid", "ÓL", "ÁR nÓL"),
("sibh", "ÓL", "BHUR nÓL"),
("siad", "ÓL", "A nÓL"),
("mé", "PORTÁN", "MO PHORTÁN"),
("tú", "PORTÁN", "DO PHORTÁN"),
("sí", "PORTÁN", "A PORTÁN"),
("sé", "PORTÁN", "A PHORTÁN"),
("muid", "PORTÁN", "ÁR bPORTÁN"),
("sibh", "PORTÁN", "BHUR bPORTÁN"),
("siad", "PORTÁN", "A bPORTÁN"),
("mé", "RÓN", "MO RÓN"),
("tú", "RÓN", "DO RÓN"),
("sí", "RÓN", "A RÓN"),
("sé", "RÓN", "A RÓN"),
("muid", "RÓN", "ÁR RÓN"),
("sibh", "RÓN", "BHUR RÓN"),
("siad", "RÓN", "A RÓN"),
("mé", "SCÁTH", "MO SCÁTH"),
("tú", "SCÁTH", "DO SCÁTH"),
("sí", "SCÁTH", "A SCÁTH"),
("sé", "SCÁTH", "A SCÁTH"),
("muid", "SCÁTH", "ÁR SCÁTH"),
("sibh", "SCÁTH", "BHUR SCÁTH"),
("siad", "SCÁTH", "A SCÁTH"),
("mé", "SFÉAR", "MO SFÉAR"),
("tú", "SFÉAR", "DO SFÉAR"),
("sí", "SFÉAR", "A SFÉAR"),
("sé", "SFÉAR", "A SFÉAR"),
("muid", "SFÉAR", "ÁR SFÉAR"),
("sibh", "SFÉAR", "BHUR SFÉAR"),
("siad", "SFÉAR", "A SFÉAR"),
("mé", "SLÍ", "MO SHLÍ"),
("tú", "SLÍ", "DO SHLÍ"),
("sí", "SLÍ", "A SLÍ"),
("sé", "SLÍ", "A SHLÍ"),
("muid", "SLÍ", "ÁR SLÍ"),
("sibh", "SLÍ", "BHUR SLÍ"),
("siad", "SLÍ", "A SLÍ"),
("mé", "SMÉARA", "MO SMÉARA"),
("tú", "SMÉARA", "DO SMÉARA"),
("sí", "SMÉARA", "A SMÉARA"),
("sé", "SMÉARA", "A SMÉARA"),
("muid", "SMÉARA", "ÁR SMÉARA"),
("sibh", "SMÉARA", "BHUR SMÉARA"),
("siad", "SMÉARA", "A SMÉARA"),
("mé", "SPÍON", "MO SPÍON"),
("tú", "SPÍON", "DO SPÍON"),
("sí", "SPÍON", "A SPÍON"),
("sé", "SPÍON", "A SPÍON"),
("muid", "SPÍON", "ÁR SPÍON"),
("sibh", "SPÍON", "BHUR SPÍON"),
("siad", "SPÍON", "A SPÍON"),
("mé", "SRÓN", "MO SHRÓN"),
("tú", "SRÓN", "DO SHRÓN"),
("sí", "SRÓN", "A SRÓN"),
("sé", "SRÓN", "A SHRÓN"),
("muid", "SRÓN", "ÁR SRÓN"),
("sibh", "SRÓN", "BHUR SRÓN"),
("siad", "SRÓN", "A SRÓN"),
("mé", "STIÚIDEO", "MO STIÚIDEO"),
("tú", "STIÚIDEO", "DO STIÚIDEO"),
("sí", "STIÚIDEO", "A STIÚIDEO"),
("sé", "STIÚIDEO", "A STIÚIDEO"),
("muid", "STIÚIDEO", "ÁR STIÚIDEO"),
("sibh", "STIÚIDEO", "BHUR STIÚIDEO"),
("siad", "STIÚIDEO", "A STIÚIDEO"),
("mé", "SÚ", "MO SHÚ"),
("tú", "SÚ", "DO SHÚ"),
("sí", "SÚ", "A SÚ"),
("sé", "SÚ", "A SHÚ"),
("muid", "SÚ", "ÁR SÚ"),
("sibh", "SÚ", "BHUR SÚ"),
("siad", "SÚ", "A SÚ"),
("mé", "TEAGHLACH", "MO THEAGHLACH"),
("tú", "TEAGHLACH", "DO THEAGHLACH"),
("sí", "TEAGHLACH", "A TEAGHLACH"),
("sé", "TEAGHLACH", "A THEAGHLACH"),
("muid", "TEAGHLACH", "ÁR dTEAGHLACH"),
("sibh", "TEAGHLACH", "BHUR dTEAGHLACH"),
("siad", "TEAGHLACH", "A dTEAGHLACH"),
("mé", "UBH", "M'UBH"),
("tú", "UBH", "D'UBH"),
("sí", "UBH", "A hUBH"),
("sé", "UBH", "A UBH"),
("muid", "UBH", "ÁR nUBH"),
("sibh", "UBH", "BHUR nUBH"),
("siad", "UBH", "A nUBH"),
("mé", "ÚLL", "M'ÚLL"),
("tú", "ÚLL", "D'ÚLL"),
("sí", "ÚLL", "A hÚLL"),
("sé", "ÚLL", "A ÚLL"),
("muid", "ÚLL", "ÁR nÚLL"),
("sibh", "ÚLL", "BHUR nÚLL"),
("siad", "ÚLL", "A nÚLL"),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment