MCPcopy Create free account
hub / github.com/dbcli/mssql-cli / test_pager_environ

Method test_pager_environ

tests/test_interactive_mode.py:96–111  ·  view source on GitHub ↗

Defaults to environment variable with no config value for pager

(mssqlcli)

Source from the content-addressed store, hash-verified

94 @staticmethod
95 @pytest.mark.timeout(60)
96 def test_pager_environ(mssqlcli):
97 """
98 Defaults to environment variable with no config value for pager
99 """
100 os.environ['PAGER'] = 'testing environ value'
101
102 config = create_mssql_cli_config()
103
104 # remove config pager value if exists
105 if 'pager' in config['main'].keys():
106 config['main'].pop('pager')
107
108 assert mssqlcli.set_default_pager(config) == 'testing environ value'
109
110 os.environ['PAGER'] = 'less -SRXF'
111 assert mssqlcli.set_default_pager(config) == 'less -SRXF'
112
113 @staticmethod
114 @pytest.mark.timeout(60)

Callers

nothing calls this directly

Calls 2

create_mssql_cli_configFunction · 0.90
set_default_pagerMethod · 0.80

Tested by

no test coverage detected