plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

test_simple_counts.py (461B)


      1 import unittest
      2 
      3 from plint.tests.test_counts import Counts
      4 
      5 
      6 class SimpleCounts(Counts):
      7     def testTrivialMonovoc(self):
      8         f = self.runCount("Ba", limit=1)
      9         self.assertEqual(1, len(f))
     10         self.assertEqual(self.getWeight(f[0]), 1)
     11 
     12     def testMonovoc(self):
     13         f = self.runCount("Babababa", limit=4)
     14         self.assertEqual(1, len(f))
     15         self.assertEqual(self.getWeight(f[0]), 4)
     16 
     17 
     18 if __name__ == "__main__":
     19     unittest.main()