예제 #1
0
 def testCheckValidPythonRaises(self):
     python = Python(version_info=(3, 0, 0))
     self.assertRaises(SystemExit, python.check_valid_python)
예제 #2
0
 def test30IsInvalidPython(self):
     python = Python(version_info=(3, 0, 0))
     self.assertEqual(python.is_valid_python(), False)
예제 #3
0
 def test27IsValidPython(self):
     python = Python(version_info=(2, 7, 0))
     self.assertEqual(python.is_valid_python(), True)
예제 #4
0
 def testStrCoerce(self):
     python = Python(python='/foo/python')
     self.assertEqual(str(python), '/foo/python')
예제 #5
0
 def testArguments(self):
     python = Python(python='/foo/python', version_info=(2, 7, 0))
     self.assertEqual(python.python, '/foo/python')
     self.assertEqual(python.version_info, (2, 7, 0))
예제 #6
0
 def testDefaults(self):
     python = Python()
     self.assertEqual(python.python, sys.executable)
     self.assertEqual(python.version_info, sys.version_info)