| 32 | """Nightly tests for the Python API of the pip package.""" |
| 33 | |
| 34 | def setUp(self): |
| 35 | # Make sure this file is not being run from the source directory, to |
| 36 | # avoid picking up source files. |
| 37 | if os.path.isdir( |
| 38 | os.path.join(os.path.dirname(__file__), 'tensorflowjs')): |
| 39 | self.fail('Do not run this test from the Python source directory. ' |
| 40 | 'This file is intended to be run on pip install.') |
| 41 | |
| 42 | self._tmp_dir = tempfile.mkdtemp() |
| 43 | super(APIAndShellTest, self).setUp() |
| 44 | |
| 45 | def tearDown(self): |
| 46 | if os.path.isdir(self._tmp_dir): |