Add basic tests for CI

Signed-off-by: Parag Nemade <pnemade@fedoraproject.org>
This commit is contained in:
Parag Nemade 2019-05-17 22:32:33 +05:30
parent 55f000d89b
commit 8a7c32c7cd
No known key found for this signature in database
GPG Key ID: 71932951EB71E972
4 changed files with 39 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 = "hi_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,11 @@
#!/usr/bin/python3
import enchant
wdlst = [ "नमस", "तरका", "चायत"]
dic = enchant.Dict("hi_IN")
for wd in wdlst:
dic.check(wd)
print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))

14
tests/tests.yml Normal file
View File

@ -0,0 +1,14 @@
- hosts: localhost
roles:
- role: standard-test-basic
required_packages:
- python3-enchant
tags:
- classic
tests:
- sample:
dir: scripts/
run: ./run_tests.sh