mirror of https://gitlab.com/pamhyr/pamhyr2
tests: Add test script and fix pep8 in unittest.
parent
d36a9cd340
commit
862ec88191
|
|
@ -24,6 +24,7 @@ from Model.Saved import SavedStatus
|
|||
from Model.Study import Study
|
||||
from Model.River import River
|
||||
|
||||
|
||||
class StudyTestCase(unittest.TestCase):
|
||||
def test_create_study(self):
|
||||
study = Study.new("foo", "bar")
|
||||
|
|
@ -57,6 +58,7 @@ class StudyTestCase(unittest.TestCase):
|
|||
study = Study.new("foo", "bar")
|
||||
self.assertNotEqual(study.river, None)
|
||||
|
||||
|
||||
class RiverTestCase(unittest.TestCase):
|
||||
def test_create_river(self):
|
||||
status = SavedStatus()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
#! /bin/sh
|
||||
|
||||
echo " Setup ENV"
|
||||
|
||||
python3 -m venv venv
|
||||
. venv/bin/activate
|
||||
pip3 install -U pip
|
||||
pip3 install -r ./full-requirements.txt
|
||||
pip3 install -U -r ./full-requirements.txt
|
||||
|
||||
echo " UNITTEST"
|
||||
|
||||
cd src/
|
||||
python3 -m unittest discover -v -t .
|
||||
cd ..
|
||||
|
||||
echo " PEP8"
|
||||
|
||||
pycodestyle ./src
|
||||
Loading…
Reference in New Issue