Fix all PEP-008 issues
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
|
||||
from cibuildwheel.environment import parse_environment
|
||||
|
||||
|
||||
@@ -13,6 +14,7 @@ def test_basic_parsing():
|
||||
assert environment_dict == {'VAR': '1', 'VBR': '2'}
|
||||
assert environment_cmds == ['export VAR=1', 'export VBR=2']
|
||||
|
||||
|
||||
def test_quotes():
|
||||
environment_recipe = parse_environment('A=1 VAR="1 NOT_A_VAR=2" VBR=\'vbr\'')
|
||||
|
||||
@@ -24,6 +26,7 @@ def test_quotes():
|
||||
assert environment_dict == {'A': '1', 'VAR': '1 NOT_A_VAR=2', 'VBR': 'vbr'}
|
||||
assert environment_cmds == ['export A=1', 'export VAR="1 NOT_A_VAR=2"', 'export VBR=\'vbr\'']
|
||||
|
||||
|
||||
def test_inheritance():
|
||||
environment_recipe = parse_environment('PATH=$PATH:/usr/local/bin')
|
||||
|
||||
@@ -35,6 +38,7 @@ def test_inheritance():
|
||||
assert environment_dict == {'PATH': '/usr/bin:/usr/local/bin'}
|
||||
assert environment_cmds == ['export PATH=$PATH:/usr/local/bin']
|
||||
|
||||
|
||||
def test_shell_eval():
|
||||
environment_recipe = parse_environment('VAR="$(echo "a test" string)"')
|
||||
|
||||
@@ -49,6 +53,7 @@ def test_shell_eval():
|
||||
assert environment_dict['VAR'] == 'a test string'
|
||||
assert environment_cmds == ['export VAR="$(echo "a test" string)"']
|
||||
|
||||
|
||||
def test_shell_eval_and_env():
|
||||
environment_recipe = parse_environment('VAR="$(echo "$PREV_VAR" string)"')
|
||||
|
||||
@@ -60,6 +65,7 @@ def test_shell_eval_and_env():
|
||||
assert environment_dict == {'PREV_VAR': '1 2 3', 'VAR': '1 2 3 string'}
|
||||
assert environment_cmds == ['export VAR="$(echo "$PREV_VAR" string)"']
|
||||
|
||||
|
||||
def test_empty_var():
|
||||
environment_recipe = parse_environment('CFLAGS=')
|
||||
|
||||
@@ -71,6 +77,7 @@ def test_empty_var():
|
||||
assert environment_dict == {'CFLAGS': ''}
|
||||
assert environment_cmds == ['export CFLAGS=']
|
||||
|
||||
|
||||
def test_no_vars():
|
||||
environment_recipe = parse_environment('')
|
||||
|
||||
@@ -80,6 +87,7 @@ def test_no_vars():
|
||||
assert environment_dict == {}
|
||||
assert environment_cmds == []
|
||||
|
||||
|
||||
def test_no_vars_pass_through():
|
||||
environment_recipe = parse_environment('')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user