Commit Graph

4 Commits

Author SHA1 Message Date
Simon Layton
d4bbcab558 Setup MPI before test start
Summary:
With __name__ == "__main__" defined, MPI4Py was no longer being setup as intended, leading to test failures on syntax errors (_has_mpi, COMM, RANK and SIZE were no longer defined in a global scope. This is fixed via explicit use of global variables and factoring out the MPI setup into a new method.
Closes https://github.com/caffe2/caffe2/pull/59

Reviewed By: Yangqing

Differential Revision: D4348956

Pulled By: bwasti

fbshipit-source-id: ee741a0fff1df00eade1b6d5e1c281afcb38da6a
2016-12-19 15:59:32 -08:00
Yangqing Jia
5eb836880d Add unittest.main() lines to test scripts under python/operator_test
Summary:
Needed by oss.

This is done by running the following line:

  find . -name "*_test.py" -exec sed -i '$ a \\nif __name__ == "__main__":\n    import unittest\n    unittest.main()' {} \;

Reviewed By: ajtulloch

Differential Revision: D4223848

fbshipit-source-id: ef4696e9701d45962134841165c53e76a2e19233
2016-11-29 15:18:37 -08:00
Yangqing Jia
d1e9215184 fbsync 2016-10-07 13:08:53 -07:00
Yangqing Jia
b23e51d467 chunky sync 2016-09-06 15:55:19 -07:00