Exemplo n.º 1
0
	def setUp(self):
		info = MorphologyInfo()
		info.variant = VARIANT_NAME
		info.morphology = u"null"
		info.speller = u"AllOk"
		info.suggestion = u"null"
		self.dataDir = TestDataDir()
		self.dataDir.createMorphology(VARIANT_NAME, info)
		self.voikko = libvoikko.Voikko("fi-x-" + VARIANT_NAME, path = self.dataDir.getDirectory())
Exemplo n.º 2
0
 def setUp(self):
     info = MorphologyInfo()
     info.variant = VARIANT_NAME
     info.morphology = u"null"
     info.speller = u"AllOk"
     info.suggestion = u"null"
     self.dataDir = TestDataDir()
     self.dataDir.createMorphology(VARIANT_NAME, info)
     self.voikko = libvoikko.Voikko("fi-x-" + VARIANT_NAME,
                                    path=self.dataDir.getDirectory())
Exemplo n.º 3
0
 def testListDictsWithPathAndAttributes(self):
     info = MorphologyInfo()
     info.variant = u"test-variant-name"
     info.description = u"Some test description sakldjasd"
     info.morphology = u"null"
     dataDir = TestDataDir()
     dataDir.createMorphology(info.variant, info)
     dicts = Voikko.listDicts(dataDir.getDirectory())
     dataDir.tearDown()
     dictsWithCorrectVariant = filter(lambda aDict: aDict.variant == info.variant, dicts)
     self.assertEqual(1, len(dictsWithCorrectVariant))
     theDict = dictsWithCorrectVariant[0]
     self.assertEqual(info.description, theDict.description)
     self.assertEqual(u"fi", theDict.language)
Exemplo n.º 4
0
	def testListDictsWithPathAndAttributes(self):
		info = MorphologyInfo()
		info.variant = u"test-variant-name"
		info.description = u"Some test description sakldjasd"
		info.morphology = u"null"
		dataDir = TestDataDir()
		dataDir.createMorphology(info.variant, info)
		dicts = Voikko.listDicts(dataDir.getDirectory())
		dataDir.tearDown()
		dictsWithCorrectVariant = filter(lambda aDict: aDict.variant == info.variant, dicts)
		self.assertEqual(1, len(dictsWithCorrectVariant))
		theDict = dictsWithCorrectVariant[0]
		self.assertEqual(info.description, theDict.description)
		self.assertEqual(u"fi", theDict.language)
Exemplo n.º 5
0
 def setUp(self):
     info = MorphologyInfo()
     info.variant = VARIANT_NAME
     info.morphology = u"null"
     self.dataDir = TestDataDir()
     self.dataDir.createMorphology(VARIANT_NAME, info)
Exemplo n.º 6
0
	def setUp(self):
		info = MorphologyInfo()
		info.variant = VARIANT_NAME
		info.morphology = u"null"
		self.dataDir = TestDataDir()
		self.dataDir.createMorphology(VARIANT_NAME, info)