| 1 |
import unittest |
| 2 |
from droidconfig import generalconfig |
| 3 |
|
| 4 |
''' |
| 5 |
To run tests: |
| 6 |
source ./venv/bin/activate |
| 7 |
python3 setup.py develop |
| 8 |
cd tests |
| 9 |
python3 ./droidconfig_test.py |
| 10 |
''' |
| 11 |
|
| 12 |
|
| 13 |
class DroidConfigTest(unittest.TestCase): |
| 14 |
def test_general_config(self): |
| 15 |
config = generalconfig(filename='../conf/general.conf', verbose=True) |
| 16 |
|
| 17 |
def test_bad_config(self): |
| 18 |
self.assertRaises(FileNotFoundError, |
| 19 |
generalconfig, |
| 20 |
'../conf/doesnotexist.conf') |
| 21 |
|
| 22 |
if __name__ == '__main__': |
| 23 |
unittest.main() |