Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 574ef62

Browse files
authored
Fix quoting in backend config args (#20)
* add backend-config init test and fixture for #17 * remove extra file * add missing boilerplate to fixture * fix backend config quoting issue * bump version
1 parent 8ace5c6 commit 574ef62

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/test_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_args():
5353

5454
def test_var_args():
5555
assert sorted(tftest.parse_args(init_vars={'a': 1, 'b': '["2"]'})) == sorted(
56-
["-backend-config='a=1'", '-backend-config=\'b=["2"]\''])
56+
["-backend-config=a=1", '-backend-config=b=["2"]'])
5757
assert sorted(tftest.parse_args(tf_vars={'a': 1, 'b': '["2"]'})) == sorted(
5858
['-var', 'b=["2"]', '-var', 'a=1'])
5959

tftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import tempfile
3434
import weakref
3535

36-
__version__ = '1.5.3'
36+
__version__ = '1.5.4'
3737

3838
_LOGGER = logging.getLogger('tftest')
3939

@@ -81,7 +81,7 @@ def parse_args(init_vars=None, tf_vars=None, targets=None, **kw):
8181
if kw.get('refresh') is False:
8282
cmd_args.append('-refresh=false')
8383
if isinstance(init_vars, dict):
84-
cmd_args += ['-backend-config=\'{}={}\''.format(k, v)
84+
cmd_args += ['-backend-config={}={}'.format(k, v)
8585
for k, v in init_vars.items()]
8686
elif isinstance(init_vars, str):
8787
cmd_args += ['-backend-config', '{}'.format(init_vars)]

0 commit comments

Comments
 (0)