Commit f08db00f by Alexander Popov

Add a template for unit-tests

parent c2e24100
...@@ -170,3 +170,8 @@ jobs: ...@@ -170,3 +170,8 @@ jobs:
run: | run: |
coverage erase coverage erase
rm ./coverage.xml rm ./coverage.xml
- name: Run unit-tests and collect coverage
run: |
coverage run --include=kconfig_hardened_check/engine.py,kconfig_hardened_check/test_engine.py -m unittest -v
coverage xml -i -o coverage_unittest.xml
#!/usr/bin/python3
"""
This tool helps me to check Linux kernel options against
my security hardening preferences for X86_64, ARM64, X86_32, and ARM.
Let the computers do their job!
Author: Alexander Popov <alex.popov@linux.com>
This module performs unit-testing of the kconfig-hardened-check engine.
"""
import unittest
# from .engine import populate_with_data, perform_checks
class TestEngine(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertTrue('Foo'.isupper())
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