From d15ee60ca7ad62004c5e036203f095cc27660f90 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Sun, 10 Apr 2022 22:21:41 +0200 Subject: Introduce a new macro (%p) representing the parent value of a given key --- tests/test_envtoolkit_instance.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests/test_envtoolkit_instance.py') diff --git a/tests/test_envtoolkit_instance.py b/tests/test_envtoolkit_instance.py index 9061dc8..09baa31 100644 --- a/tests/test_envtoolkit_instance.py +++ b/tests/test_envtoolkit_instance.py @@ -1,5 +1,5 @@ # etoolkit -# Copyright (C) 2021-22 Simeon Simeonov +# Copyright (C) 2021-2022 Simeon Simeonov # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -63,4 +63,13 @@ def test_get_environ(config_data): def test_get_full_name(config_data): """Tests the EtoolkitInstance.get_full_name method""" instance = etoolkit.EtoolkitInstance('secret', config_data) - assert instance.get_full_name('->') == 'default->secret' + assert instance.get_full_name('->') == '_default->secret' + + +def test_parent_vars(config_data): + """Tests the EtoolkitInstance.get_full_name method""" + instance = etoolkit.EtoolkitInstance('dev', config_data) + assert instance.get_full_name('->') == '_default->dev' + assert instance.get_environ()['PYTHONPATH'] == ( + '/home/foo/_default/python:/home/user/dev/.pythonpath' + ) -- cgit v1.3