plint

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

test_poem_counts.py (1143B)


      1 import unittest
      2 
      3 from plint.tests.test_counts import Counts
      4 
      5 
      6 class PoemCounts(Counts):
      7     v1 = "Qui berce longuement notre esprit enchanté"
      8     v2 = "Qu'avez-vous ? Je n'ai rien. Mais... Je n'ai rien, vous dis-je,"
      9     v3 = "Princes, toute h mer est de vaisseaux couverte,"
     10     v4 = "Souvent le car qui l'a ne le sait pas lui-même"
     11     v5 = "Quand nos États vengés jouiront de mes soins"
     12 
     13     def testV1(self):
     14         possible = self.runCount(self.v1, limit=12)
     15         self.assertTrue(self.achievesPossibility(possible, 12))
     16 
     17     def testV2(self):
     18         possible = self.runCount(self.v2, limit=12)
     19         self.assertTrue(self.achievesPossibility(possible, 12))
     20 
     21     def testV3(self):
     22         possible = self.runCount(self.v3, limit=12)
     23         self.assertTrue(self.achievesPossibility(possible, 12))
     24 
     25     def testV4(self):
     26         possible = self.runCount(self.v4, limit="6/6")
     27         self.assertTrue(self.achievesPossibility(possible, 12))
     28 
     29     def testV5(self):
     30         possible = self.runCount(self.v5, limit="6/6")
     31         self.assertTrue(self.achievesPossibility(possible, 12))
     32 
     33 if __name__ == "__main__":
     34     unittest.main()