Skip to content

Commit a8c6f0e

Browse files
author
Will Trimble
committed
Default for reading configuration file
1 parent f2e5734 commit a8c6f0e

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed
File renamed without changes.

tests/test_byhand.py

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
def read_api_list(filename):
1111
server_list = []
12+
if not os.path.isfile(filename):
13+
return(["http://api.mg-rast.org", "https://api.mg-rast.org"]) for l in open(filename).readlines():
1214
for l in open(filename).readlines():
1315
server_list.append(l.strip())
1416
return(server_list)

tests/test_multiple.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
import os
23
from subprocess import check_output
34

45
# This test was noted failing for some backend API servers but not others
@@ -7,6 +8,8 @@
78

89
def read_api_list(filename):
910
server_list = []
11+
if not os.path.isfile(filename):
12+
return(["http://api.mg-rast.org", "https://api.mg-rast.org"])
1013
for l in open(filename).readlines():
1114
server_list.append(l.strip())
1215
return(server_list)

0 commit comments

Comments
 (0)