コード例 #1
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
    def test_error(self):
        class A(object):
            pass

        val = A()
        self.assertFalse(is_variable_type(val))
コード例 #2
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
 def test_unknownNumericType(self):
     ref = MyBogusNumericType(42)
     self.assertFalse(is_variable_type(ref))
コード例 #3
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
 def test_string(self):
     self.assertFalse(is_variable_type('foo'))
コード例 #4
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
 def test_const1(self):
     val = NumericConstant(1.0)
     self.assertFalse(is_variable_type(val))
コード例 #5
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
 def test_long(self):
     val = int(1e10)
     self.assertFalse(is_variable_type(val))
コード例 #6
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
 def test_int(self):
     self.assertFalse(is_variable_type(1))
コード例 #7
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
 def test_float(self):
     self.assertFalse(is_variable_type(1.1))
コード例 #8
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
 def test_bool(self):
     self.assertFalse(is_variable_type(True))
コード例 #9
0
ファイル: test_numvalue.py プロジェクト: Utkarsh-Detha/pyomo
 def test_none(self):
     self.assertFalse(is_variable_type(None))