Add CI tests
This commit is contained in:
parent
4f9a7e926e
commit
10ce1cc540
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
5
plans/basic.fmf
Normal file
5
plans/basic.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Basic smoke test
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
7
tests/main.fmf
Normal file
7
tests/main.fmf
Normal file
@ -0,0 +1,7 @@
|
||||
require:
|
||||
- python3
|
||||
- python3-enchant
|
||||
- hunspell-en-US
|
||||
- hunspell-de
|
||||
test: python3 test_enchant.py -v
|
||||
framework: shell
|
31
tests/test_enchant.py
Normal file
31
tests/test_enchant.py
Normal file
@ -0,0 +1,31 @@
|
||||
import unittest
|
||||
import sys
|
||||
import enchant
|
||||
|
||||
class TestEnchant(unittest.TestCase):
|
||||
|
||||
def test_dummy(self):
|
||||
self.assertEqual(True, True)
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_expected_failure(self):
|
||||
self.assertEqual(False, True)
|
||||
|
||||
def test_en_US(self):
|
||||
d = enchant.Dict('en_US')
|
||||
self.assertEqual(d.check('enchant'), True)
|
||||
self.assertEqual(d.check('enchnt'), False)
|
||||
self.assertEqual(
|
||||
d.suggest('enchnt'),
|
||||
['enchant', 'entrench', 'tench'])
|
||||
|
||||
def test_de_DE(self):
|
||||
d = enchant.Dict('de_DE')
|
||||
self.assertEqual(d.check('Alpenglühen'), True)
|
||||
self.assertEqual(d.check('Alpengluhen'), False)
|
||||
self.assertEqual(
|
||||
d.suggest('Alpengluhen'),
|
||||
['Alpenglühen', 'Alpengluten', 'Alpenländischen'])
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
Loading…
Reference in New Issue
Block a user