Skip to content

Commit

Permalink
fix: make example runnable as a class with unittest
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael te Boekhorst <[email protected]>
  • Loading branch information
boekhorstb1 committed Jun 11, 2024
1 parent 4ba2d89 commit 0a830b6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/modules/test_example.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-

import pytest
import unittest

from rookify.modules.example.main import ExampleHandler
from rookify.modules.machine import Machine
from rookify.modules.module import ModuleException


def test_preflight() -> None:
with pytest.raises(ModuleException):
ExampleHandler(Machine(), {}).preflight()
class TestExampleHandler(unittest.TestCase):
def test_preflight(self) -> None:
with self.assertRaises(ModuleException):
ExampleHandler(Machine(), {}).preflight()

0 comments on commit 0a830b6

Please sign in to comment.