Coverage for core\test_leoConfig.py: 100%

15 statements  

« prev     ^ index     » next       coverage.py v6.4, created at 2022-05-24 10:21 -0500

1# -*- coding: utf-8 -*- 

2#@+leo-ver=5-thin 

3#@+node:ekr.20210910073303.1: * @file ../unittests/core/test_leoConfig.py 

4#@@first 

5"""Tests of leoConfig.py""" 

6 

7from leo.core import leoGlobals as g 

8from leo.core.leoTest2 import LeoUnitTest 

9 

10#@+others 

11#@+node:ekr.20210910073303.2: ** class TestConfig(LeoUnitTest) 

12class TestConfig(LeoUnitTest): 

13 """Test cases for leoConfig.py""" 

14 #@+others 

15 #@+node:ekr.20210910075848.1: *3* TestConfig.test_g_app_config_and_c_config 

16 def test_g_app_config_and_c_config(self): 

17 c = self.c 

18 assert g.app.config 

19 assert c.config 

20 #@+node:ekr.20210909194336.16: *3* TestConfig.test_c_config_printSettings 

21 def test_c_config_printSettings(self): 

22 c = self.c 

23 c.config.printSettings() 

24 #@+node:ekr.20210909194336.22: *3* TestConfig.test_local_settings_c_page_width_ 

25 def test_local_settings_c_page_width_(self): 

26 c = self.c 

27 assert c.page_width 

28 self.assertEqual(c.page_width, c.config.getInt('page_width')) 

29 #@-others 

30#@-others 

31#@-leo