aboutsummaryrefslogtreecommitdiff
path: root/utils/acc_regex_test.py
diff options
context:
space:
mode:
authorAdrián Oliva <adrian.oliva@cimat.mx>2023-05-08 21:31:09 -0600
committerAdrián Oliva <adrian.oliva@cimat.mx>2023-05-08 21:31:09 -0600
commitca65b3836eaa5b026b3f13afdd7ad3b8b192e9a4 (patch)
tree86e55759380d38c92b47f124bd051c3ecfccd089 /utils/acc_regex_test.py
parent269eee248d24acbb12f13ab519dfbe1c881d3bb8 (diff)
downloadLedger.py-ca65b3836eaa5b026b3f13afdd7ad3b8b192e9a4.tar.gz
Ledger.py-ca65b3836eaa5b026b3f13afdd7ad3b8b192e9a4.zip
First attempt at sorting accounts.
I DID IT!! I'm really happy with the result. :')
Diffstat (limited to 'utils/acc_regex_test.py')
-rw-r--r--utils/acc_regex_test.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/acc_regex_test.py b/utils/acc_regex_test.py
new file mode 100644
index 0000000..309d83a
--- /dev/null
+++ b/utils/acc_regex_test.py
@@ -0,0 +1,17 @@
+import acc_regex
+import unittest
+
+
+class test_create_ors(unittest.TestCase):
+ def test_create_ors(self):
+ self.assertEqual(acc_regex.create_ors('Rent Transportation'), 'Rent or Transportation')
+ self.assertEqual(acc_regex.create_ors('Income and Job'), 'Income and Job')
+ self.assertEqual(acc_regex.create_ors('Radio and (Judge Police)'), 'Radio and (Judge or Police)')
+
+ self.assertEqual(acc_regex.create_ors('(Telephone not Beach) not House'), '(Telephone or not Beach) or not House')
+
+ self.assertEqual(acc_regex.create_ors('Run'), 'Run')
+
+
+if __name__ == '__main__':
+ unittest.main()