Python _testcapi.getargs_K() Examples
The following are 14
code examples of _testcapi.getargs_K().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
_testcapi
, or try the search function
.
Example #1
Source File: test_getargs2.py From Fluid-Designer with GNU General Public License v3.0 | 6 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(0, getargs_K(IntSubclass())) self.assertRaises(TypeError, getargs_K, BadInt()) self.assertRaises(TypeError, getargs_K, BadInt2()) self.assertEqual(0, getargs_K(BadInt3())) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #2
Source File: test_getargs2.py From ironpython3 with Apache License 2.0 | 6 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(0, getargs_K(IntSubclass())) self.assertRaises(TypeError, getargs_K, BadInt()) self.assertRaises(TypeError, getargs_K, BadInt2()) self.assertEqual(0, getargs_K(BadInt3())) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #3
Source File: test_getargs2.py From Project-New-Reign---Nemesis-Main with GNU General Public License v3.0 | 6 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(0, getargs_K(IntSubclass())) self.assertRaises(TypeError, getargs_K, BadInt()) self.assertRaises(TypeError, getargs_K, BadInt2()) self.assertEqual(0, getargs_K(BadInt3())) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #4
Source File: test_getargs2.py From ironpython2 with Apache License 2.0 | 5 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(42, getargs_K(42L)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #5
Source File: test_getargs2.py From BinderFilter with MIT License | 5 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(42, getargs_K(42L)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #6
Source File: test_getargs2.py From BinderFilter with MIT License | 5 votes |
def test_main(): tests = [Signed_TestCase, Unsigned_TestCase, Tuple_TestCase, Keywords_TestCase] try: from _testcapi import getargs_L, getargs_K except ImportError: pass # PY_LONG_LONG not available else: tests.append(LongLong_TestCase) test_support.run_unittest(*tests)
Example #7
Source File: test_getargs2.py From oss-ftp with MIT License | 5 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(42, getargs_K(42L)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #8
Source File: test_getargs2.py From gcblue with BSD 3-Clause "New" or "Revised" License | 5 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(42, getargs_K(42L)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #9
Source File: test_getargs2.py From medicare-demo with Apache License 2.0 | 5 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) self.failUnlessEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.failUnlessEqual(0, getargs_K(0)) self.failUnlessEqual(0, getargs_K(ULLONG_MAX+1)) self.failUnlessEqual(42, getargs_K(42)) self.failUnlessEqual(42, getargs_K(42L)) self.failUnlessEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #10
Source File: test_getargs2.py From medicare-demo with Apache License 2.0 | 5 votes |
def test_main(): tests = [Signed_TestCase, Unsigned_TestCase, Tuple_TestCase] try: from _testcapi import getargs_L, getargs_K except ImportError: pass # PY_LONG_LONG not available else: tests.append(LongLong_TestCase) test_support.run_unittest(*tests)
Example #11
Source File: test_getargs2.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(42, getargs_K(42L)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #12
Source File: test_getargs2.py From CTFCrackTools-V2 with GNU General Public License v3.0 | 5 votes |
def test_main(): tests = [Signed_TestCase, Unsigned_TestCase, Tuple_TestCase, Keywords_TestCase] try: from _testcapi import getargs_L, getargs_K except ImportError: pass # PY_LONG_LONG not available else: tests.append(LongLong_TestCase) test_support.run_unittest(*tests)
Example #13
Source File: test_getargs2.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def test_K(self): from _testcapi import getargs_K # K return 'unsigned long long', no range checking self.assertRaises(TypeError, getargs_K, 3.14) self.assertRaises(TypeError, getargs_K, Long()) self.assertRaises(TypeError, getargs_K, Int()) self.assertEqual(ULLONG_MAX, getargs_K(ULLONG_MAX)) self.assertEqual(0, getargs_K(0)) self.assertEqual(0, getargs_K(ULLONG_MAX+1)) self.assertEqual(42, getargs_K(42)) self.assertEqual(42, getargs_K(42L)) self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
Example #14
Source File: test_getargs2.py From CTFCrackTools with GNU General Public License v3.0 | 5 votes |
def test_main(): tests = [Signed_TestCase, Unsigned_TestCase, Tuple_TestCase, Keywords_TestCase] try: from _testcapi import getargs_L, getargs_K except ImportError: pass # PY_LONG_LONG not available else: tests.append(LongLong_TestCase) test_support.run_unittest(*tests)