Skip to content

Commit 3c2b02c

Browse files
committed
updated test function
1 parent e022dcd commit 3c2b02c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,19 @@ def test_internet_connection(databases: List[str]) -> None:
354354
print(f"{NCBI_FTP_HOST} open on port 21.", file=sys.stdout)
355355
except Exception as e:
356356
error_list.append(f"Port 21 not open for {NCBI_FTP_HOST}. Check possible firewall/server issues. \nException:{e}")
357+
try:
358+
print("Checking Table2asn functionality...", file=sys.stdout)
359+
table2asn_dir = "/tmp/table2asn"
360+
download_table2asn(table2asn_dir)
361+
command = [table2asn_dir, "-version-full-xml"]
362+
print("Running Table2asn.", file=sys.stdout)
363+
proc = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd = os.path.join(os.path.dirname(os.path.abspath(__file__))))
364+
if proc.returncode != 0:
365+
error_list.append("Table2asn-Error")
366+
error_list.append(proc.stdout)
367+
error_list.append(proc.stderr)
368+
except Exception as e:
369+
error_list.append(f"Unable to download latest version of Table2asn. \nException:{e}")
357370
if error_list:
358371
for error_string in error_list:
359372
print(error_string, file=sys.stderr)

0 commit comments

Comments
 (0)