-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
… travis.yml modified to call pytest
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import subprocess as sp | ||
|
||
def get_file_list(): | ||
#Add the name of the python scripts to the list that needs to be tested | ||
file_list = ['RegenerateConnectome.py', 'SpreadsheetDataReader.py', 'OpenWormReader.py'] | ||
return file_list | ||
|
||
|
||
def test_python_scripts(file_list = get_file_list()): | ||
''' | ||
Executes the desired python scripts and check whether they exit correctly(code 0) or not. | ||
:param file_list: contains files that are to be tested | ||
:return: none | ||
''' | ||
|
||
#stores returncode of each file. | ||
returncode_list = [] | ||
|
||
for each_script in file_list: | ||
exit_code = sp.call("python "+each_script, shell=True) | ||
returncode_list.append(exit_code) | ||
|
||
for i in range(len(file_list)): | ||
assert(returncode_list[i] == 0),"Test Failed for " + file_list[i] | ||
print("Test passed for " + file_list[i]) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
from setuptools import setup | ||
from setuptools.command.install import install as _install | ||
|