Added CI tests
Signed-off-by: Parag Nemade <pnemade@fedoraproject.org>
This commit is contained in:
parent
ff7533b099
commit
8227c7d425
4
tests/scripts/run_tests.sh
Normal file
4
tests/scripts/run_tests.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
python3 test_suggest_words.py
|
||||
python3 test_dic_availability.py
|
10
tests/scripts/test_dic_availability.py
Normal file
10
tests/scripts/test_dic_availability.py
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import enchant
|
||||
|
||||
lang = "te_IN"
|
||||
try:
|
||||
dic = enchant.request_dict(lang)
|
||||
print("Dictionary for {0} language is available for use".format(lang))
|
||||
except enchant.errors.DictNotFoundError:
|
||||
print("Dictionary is not installed for use")
|
9
tests/scripts/test_suggest_words.py
Normal file
9
tests/scripts/test_suggest_words.py
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import enchant
|
||||
|
||||
wdlst = [ "లో", "మది", "తెగు"]
|
||||
dic = enchant.Dict("te_IN")
|
||||
for wd in wdlst:
|
||||
dic.check(wd)
|
||||
print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))
|
11
tests/tests.yml
Normal file
11
tests/tests.yml
Normal file
@ -0,0 +1,11 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
required_packages:
|
||||
- python3-enchant
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- sample:
|
||||
dir: scripts/
|
||||
run: ./run_tests.sh
|
Loading…
Reference in New Issue
Block a user