12
12
# Use ServerApps environment because it monkeypatches
13
13
# jupyter_core.paths and provides a config directory
14
14
# that's not cross contaminating the user config directory.
15
- pytestmark = pytest .mark .usefixtures ("environ " )
15
+ pytestmark = pytest .mark .usefixtures ("jp_environ " )
16
16
17
17
18
18
def test_help_output ():
@@ -29,13 +29,13 @@ def get_config(sys_prefix=True):
29
29
return data .get ("ServerApp" , {}).get ("jpserver_extensions" , {})
30
30
31
31
32
- def test_enable (env_config_path , extension_environ ):
32
+ def test_enable (jp_env_config_path , jp_extension_environ ):
33
33
toggle_server_extension_python ('mock1' , True )
34
34
config = get_config ()
35
35
assert config ['mock1' ]
36
36
37
37
38
- def test_disable (env_config_path , extension_environ ):
38
+ def test_disable (jp_env_config_path , jp_extension_environ ):
39
39
toggle_server_extension_python ('mock1' , True )
40
40
toggle_server_extension_python ('mock1' , False )
41
41
@@ -44,9 +44,9 @@ def test_disable(env_config_path, extension_environ):
44
44
45
45
46
46
def test_merge_config (
47
- env_config_path ,
48
- configurable_serverapp ,
49
- extension_environ
47
+ jp_env_config_path ,
48
+ jp_configurable_serverapp ,
49
+ jp_extension_environ
50
50
):
51
51
# Toggle each extension module with a JSON config file
52
52
# at the sys-prefix config dir.
@@ -80,8 +80,8 @@ def test_merge_config(
80
80
)
81
81
82
82
# Enable the last extension, mockext_py, using the CLI interface.
83
- app = configurable_serverapp (
84
- config_dir = str (env_config_path ),
83
+ app = jp_configurable_serverapp (
84
+ config_dir = str (jp_env_config_path ),
85
85
argv = [arg ]
86
86
)
87
87
# Verify that extensions are enabled and merged in proper order.
@@ -94,7 +94,7 @@ def test_merge_config(
94
94
95
95
96
96
@pytest .mark .parametrize (
97
- 'server_config ' ,
97
+ 'jp_server_config ' ,
98
98
[
99
99
{
100
100
"ServerApp" : {
@@ -106,7 +106,7 @@ def test_merge_config(
106
106
}
107
107
]
108
108
)
109
- def test_load_ordered (serverapp ):
110
- assert serverapp .mockII is True , "Mock II should have been loaded"
111
- assert serverapp .mockI is True , "Mock I should have been loaded"
112
- assert serverapp .mock_shared == 'II' , "Mock II should be loaded after Mock I"
109
+ def test_load_ordered (jp_serverapp ):
110
+ assert jp_serverapp .mockII is True , "Mock II should have been loaded"
111
+ assert jp_serverapp .mockI is True , "Mock I should have been loaded"
112
+ assert jp_serverapp .mock_shared == 'II' , "Mock II should be loaded after Mock I"
0 commit comments