Skip to content

Commit 5a168e0

Browse files
laurenyuEliza Zhang
authored andcommitted
Fix instance_type fixture setup for tests (aws#168)
1 parent 45e7c4c commit 5a168e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ def account_id(request):
9090

9191
@pytest.fixture(scope='session')
9292
def instance_type(request, processor):
93-
return request.config.getoption('--instance-type') or \
94-
'ml.c4.xlarge' if processor == 'cpu' else 'ml.p2.xlarge'
93+
provided_instance_type = request.config.getoption('--instance-type')
94+
default_instance_type = 'ml.c4.xlarge' if processor == 'cpu' else 'ml.p2.xlarge'
95+
return provided_instance_type if provided_instance_type is not None else default_instance_type
9596

9697

9798
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)