Skip to content

Commit

Permalink
Add unittest back
Browse files Browse the repository at this point in the history
  • Loading branch information
demianzhang authored Apr 5, 2019
1 parent f763344 commit 52f029f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/unittest.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$CWD = $PWD

# -------------For python unittest-------------

## ------Run annotation test------
echo ""
echo "===========================Testing: nni_annotation==========================="
cd $CWD/../tools/
python -m unittest -v nni_annotation/test_annotation.py

## Export certain environment variables for unittest code to work
$env:NNI_TRIAL_JOB_ID="test_trial_job_id"
$env:NNI_PLATFORM="unittest"

## ------Run sdk test------
echo ""
echo "===========================Testing: nni_sdk==========================="
cd $CWD/../src/sdk/pynni/
python -m unittest discover -v tests



# -------------For typescript unittest-------------
cd $CWD/../src/nni_manager
echo ""
echo "===========================Testing: nni_manager==========================="
npm run test

0 comments on commit 52f029f

Please sign in to comment.