Home | History | Annotate | Download | only in part1
      1 #!/usr/bin/env python
      2 #
      3 # Copyright (C) 2017 The Android Open Source Project
      4 #
      5 # Licensed under the Apache License, Version 2.0 (the "License");
      6 # you may not use this file except in compliance with the License.
      7 # You may obtain a copy of the License at
      8 #
      9 #      http://www.apache.org/licenses/LICENSE-2.0
     10 #
     11 # Unless required by applicable law or agreed to in writing, software
     12 # distributed under the License is distributed on an "AS IS" BASIS,
     13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14 # See the License for the specific language governing permissions and
     15 # limitations under the License.
     16 #
     17 
     18 import logging
     19 
     20 from vts.runners.host import asserts
     21 from vts.runners.host import base_test
     22 from vts.runners.host import const
     23 from vts.runners.host import test_runner
     24 
     25 
     26 class VtsSelfTestPythonVirtualenvPreparerTestPart1(base_test.BaseTestClass):
     27     '''Tests plan and module level VirtualenvPreparer.'''
     28 
     29     def setUpClass(self):
     30         # Since we are running the actual test cases, run_as_vts_self_test
     31         # must be set to False.
     32         self.run_as_vts_self_test = False
     33 
     34     def testVirtualenvPreparerTestPart1(self):
     35         '''If there's no error at this point, then test pass.'''
     36         try:
     37             import numpy
     38         except ImportError:
     39             asserts.fail('numpy is not installed from plan level preparer.')
     40 
     41 
     42 if __name__ == "__main__":
     43     test_runner.main()
     44