mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-27 20:08:51 -06:00
refactor: join name lists through core.text
This commit is contained in:
1 parent
4b8e91bb6f
commit
a9d8e571c1
16 files changed
+54
-56
No files matched your search
+11
-1
@@ -6,7 +6,7 @@ import tests
|
||||
|
||||
import unittest
|
||||
|
||||
from core.text import count_text
|
||||
from core.text import count_text, series
|
||||
|
||||
|
||||
class CountsTakeTheirNumber(unittest.TestCase):
|
||||
@@ -20,5 +20,15 @@ class CountsTakeTheirNumber(unittest.TestCase):
|
||||
self.assertEqual(count_text(2, "entry", "entries"), "2 entries")
|
||||
|
||||
|
||||
class ListsHaveNoSerialComma(unittest.TestCase):
|
||||
"""The README alone wrote "RetroPie, and RomM", every page "B and C"."""
|
||||
|
||||
def test_series(self):
|
||||
self.assertEqual(series([]), "")
|
||||
self.assertEqual(series(["a"]), "a")
|
||||
self.assertEqual(series(["a", "b"]), "a and b")
|
||||
self.assertEqual(series(["a", "b", "c"], "or"), "a, b or c")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user