Added CI tests

Signed-off-by: Parag Nemade <pnemade@fedoraproject.org>
This commit is contained in:
Parag Nemade 2019-05-19 16:16:34 +05:30
parent ff7533b099
commit 8227c7d425
No known key found for this signature in database
GPG Key ID: 71932951EB71E972
4 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,4 @@
#!/bin/bash
python3 test_suggest_words.py
python3 test_dic_availability.py

View 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")

View 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
View 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