Coverage for tests/test_rulekit.py: 93%

15 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2025-01-07 11:26 +0000

1import unittest 

2 

3from jpype import JClass 

4 

5from rulekit.main import RuleKit 

6 

7 

8class TestRuleKitMainClass(unittest.TestCase): 

9 

10 @classmethod 

11 def setUpClass(cls): 

12 RuleKit.init() 

13 

14 def test_reading_version(self): 

15 self.assertIsNotNone(RuleKit.version, 'Version should not be None') 

16 self.assertEqual(len(RuleKit.version.split('.')), 3, 'Version should have correct format') 

17 

18 def test_loading_rulekit_class(self): 

19 example_rulekit_class = JClass('adaa.analytics.rules.logic.rulegenerator.RuleGenerator') 

20 self.assertIsNotNone(example_rulekit_class, 'Should load RuleKit classes') 

21 

22 

23if __name__ == '__main__': 

24 unittest.main()