Commit faefc0e6 authored by Hugo Posnic's avatar Hugo Posnic

Introduce unittest

parent 45e1d47c
language: python
- "3.5"
- sudo apt-get install -qq -y python3-gi gir1.2-gtk-3.0
# command to run tests
script: python -m unittest
......@@ -17,7 +17,7 @@ package() {
cp -a ui/* "${pkgdir}/usr/share/${_pkgname}"
install -D -m644 ${_pkgname}.desktop ${pkgdir}/etc/skel/.config/autostart/${_pkgname}.desktop
install -D -m644 ${_pkgname}.desktop ${pkgdir}/usr/share/applications/${_pkgname}.desktop
install -D -m755 "src/${_pkgname}.py" "${pkgdir}/usr/bin/${_pkgname}.py"
install -D -m755 "src/" "${pkgdir}/usr/bin/"
cd "po"
for lang in $(ls -1 | sed -e 's/\..*$//'); do
if [ $lang != "manjaro-hello" ]
......@@ -12,4 +12,4 @@ for lang in $(ls -1 | sed -e 's/\..*$//'); do
cd ..
python src/
python src/
"test": "json"
import unittest
from src import manjaro_hello
class ManjaroHello(unittest.TestCase):
def setUp(self):
self.path = "test/"
def test_read_json(self):
json = manjaro_hello.read_json(self.path + "test.json")
self.assertEqual(json, {"test":"json"})
json = manjaro_hello.read_json(self.path + "test")
self.assertEqual(json, None)
def test_get_lsb_infos(self):
self.assertIsInstance(manjaro_hello.get_lsb_infos(), dict)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment