| @@ 26-35 (lines=10) @@ | ||
| 23 | assert x.get("section1", "key1") == "value1" |
|
| 24 | ||
| 25 | ||
| 26 | def test_envtpl2(): |
|
| 27 | os.environ["ENV_VAR"] = "foo" |
|
| 28 | x = OpinionatedConfigParser(use_envtpl=True) |
|
| 29 | x.read_dict(TEST_DICT1) |
|
| 30 | try: |
|
| 31 | render_string("foo") |
|
| 32 | except Exception: |
|
| 33 | pytest.skip("envtpl support missing => skipping") |
|
| 34 | assert x.get("section1", "key1") == "value1foo" |
|
| 35 | del os.environ["ENV_VAR"] |
|
| 36 | ||
| @@ 14-23 (lines=10) @@ | ||
| 11 | } |
|
| 12 | ||
| 13 | ||
| 14 | def test_envtpl(): |
|
| 15 | if "ENV_VAR" in os.environ: |
|
| 16 | del os.environ["ENV_VAR"] |
|
| 17 | x = OpinionatedConfigParser(use_envtpl=True) |
|
| 18 | x.read_dict(TEST_DICT1) |
|
| 19 | try: |
|
| 20 | render_string("foo") |
|
| 21 | except Exception: |
|
| 22 | pytest.skip("envtpl support missing => skipping") |
|
| 23 | assert x.get("section1", "key1") == "value1" |
|
| 24 | ||
| 25 | ||
| 26 | def test_envtpl2(): |
|