Skip to content

Commit

Permalink
Add "python setup.py test" option (fixes numenta#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaganBolliger committed Nov 24, 2015
1 parent d48afb7 commit fad3bed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bindings/py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ def findRequirements(platform):



def runTests(args):
errno = subprocess.call(["py.test", " ".join(args)])
raise SystemExit(errno)



def printOptions(optionsDesc):
"""
Print command line options.
Expand Down Expand Up @@ -517,10 +523,12 @@ def getExtensionModules(nupicCoreReleaseDir, platform, bitness, cxxCompiler, cmd
cwd = os.getcwd()
os.chdir(PY_BINDINGS)

if sys.argv[1] == "test":
runTests(sys.argv[2:])

options = getCommandLineOptions()
platform, bitness = getPlatformInfo()
cxxCompiler = getCompilerInfo(getCommandLineOption("compiler", options))

print "NumPy version: {}".format(numpy.__version__)
print "Bindings directory: {}".format(PY_BINDINGS)

Expand Down

0 comments on commit fad3bed

Please sign in to comment.