@@ -256,15 +256,15 @@ def test_system_creation():
256256 # Test that the system file -- and just that file -- is created on
257257 # demand.
258258
259- assert not os .path .isfile (config ._location (SYSTEM ))
260- assert not os .path .isfile (config ._location (GLOBAL ))
261- assert not os .path .isfile (config ._location (LOCAL ))
259+ assert not os .path .isfile (config ._location (SYSTEM )[ 0 ] )
260+ assert not os .path .isfile (config ._location (GLOBAL )[ 0 ] )
261+ assert not os .path .isfile (config ._location (LOCAL )[ 0 ] )
262262
263263 update_testcfg ('pytest' , 'key' , 'val' , configfile = SYSTEM )
264264
265- assert os .path .isfile (config ._location (SYSTEM ))
266- assert not os .path .isfile (config ._location (GLOBAL ))
267- assert not os .path .isfile (config ._location (LOCAL ))
265+ assert os .path .isfile (config ._location (SYSTEM )[ 0 ] )
266+ assert not os .path .isfile (config ._location (GLOBAL )[ 0 ] )
267+ assert not os .path .isfile (config ._location (LOCAL )[ 0 ] )
268268 assert cfg (f = ALL )['pytest' ]['key' ] == 'val'
269269 assert cfg (f = SYSTEM )['pytest' ]['key' ] == 'val'
270270 assert 'pytest' not in cfg (f = GLOBAL )
@@ -274,15 +274,15 @@ def test_system_creation():
274274def test_global_creation ():
275275 # Like test_system_creation, for global config options.
276276
277- assert not os .path .isfile (config ._location (SYSTEM ))
278- assert not os .path .isfile (config ._location (GLOBAL ))
279- assert not os .path .isfile (config ._location (LOCAL ))
277+ assert not os .path .isfile (config ._location (SYSTEM )[ 0 ] )
278+ assert not os .path .isfile (config ._location (GLOBAL )[ 0 ] )
279+ assert not os .path .isfile (config ._location (LOCAL )[ 0 ] )
280280
281281 update_testcfg ('pytest' , 'key' , 'val' , configfile = GLOBAL )
282282
283- assert not os .path .isfile (config ._location (SYSTEM ))
284- assert os .path .isfile (config ._location (GLOBAL ))
285- assert not os .path .isfile (config ._location (LOCAL ))
283+ assert not os .path .isfile (config ._location (SYSTEM )[ 0 ] )
284+ assert os .path .isfile (config ._location (GLOBAL )[ 0 ] )
285+ assert not os .path .isfile (config ._location (LOCAL )[ 0 ] )
286286 assert cfg (f = ALL )['pytest' ]['key' ] == 'val'
287287 assert 'pytest' not in cfg (f = SYSTEM )
288288 assert cfg (f = GLOBAL )['pytest' ]['key' ] == 'val'
@@ -292,15 +292,15 @@ def test_global_creation():
292292def test_local_creation ():
293293 # Like test_system_creation, for local config options.
294294
295- assert not os .path .isfile (config ._location (SYSTEM ))
296- assert not os .path .isfile (config ._location (GLOBAL ))
297- assert not os .path .isfile (config ._location (LOCAL ))
295+ assert not os .path .isfile (config ._location (SYSTEM )[ 0 ] )
296+ assert not os .path .isfile (config ._location (GLOBAL )[ 0 ] )
297+ assert not os .path .isfile (config ._location (LOCAL )[ 0 ] )
298298
299299 update_testcfg ('pytest' , 'key' , 'val' , configfile = LOCAL )
300300
301- assert not os .path .isfile (config ._location (SYSTEM ))
302- assert not os .path .isfile (config ._location (GLOBAL ))
303- assert os .path .isfile (config ._location (LOCAL ))
301+ assert not os .path .isfile (config ._location (SYSTEM )[ 0 ] )
302+ assert not os .path .isfile (config ._location (GLOBAL )[ 0 ] )
303+ assert os .path .isfile (config ._location (LOCAL )[ 0 ] )
304304 assert cfg (f = ALL )['pytest' ]['key' ] == 'val'
305305 assert 'pytest' not in cfg (f = SYSTEM )
306306 assert 'pytest' not in cfg (f = GLOBAL )
@@ -310,9 +310,9 @@ def test_local_creation():
310310def test_local_creation_with_topdir ():
311311 # Like test_local_creation, with a specified topdir.
312312
313- system = pathlib .Path (config ._location (SYSTEM ))
314- glbl = pathlib .Path (config ._location (GLOBAL ))
315- local = pathlib .Path (config ._location (LOCAL ))
313+ system = pathlib .Path (config ._location (SYSTEM )[ 0 ] )
314+ glbl = pathlib .Path (config ._location (GLOBAL )[ 0 ] )
315+ local = pathlib .Path (config ._location (LOCAL )[ 0 ] )
316316
317317 topdir = pathlib .Path (os .getcwd ()) / 'test-topdir'
318318 topdir_west = topdir / '.west'
0 commit comments