code stringlengths 3 6.57k |
|---|
self.assertTrue(summary1 != summary2, "{0} != {1} should be True") |
test_inequality_operator_should_return_false_on_items_with_same_value(self) |
ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success) |
ExtensionsSummaryTestCase._create_extensions_summary([("Extension 1", ExtensionStatusValue.success) |
self.assertFalse(summary1 != summary2, "{0} != {1} should be False".format(summary1, summary2) |
unittest.main() |
Header(pstruct.type) |
dyn.block(3) |
dyn.block(3) |
LogicalScreenDescriptor(pstruct.type) |
_Flags(pbinary.struct) |
optional(self) |
dyn.clone(ColorTable, length=pow(2, self['Flags']['Size'] + 1) |
dyn.clone(ColorTable, length=0) |
Color(pstruct.type) |
ColorTable(parray.type) |
ImageDescriptor(pstruct.type) |
_Flags(pbinary.struct) |
optional(self) |
dyn.clone(ColorTable, length=pow(2, self['Flags']['Size'] + 1) |
dyn.clone(ColorTable, length=0) |
Trailer(pint.uint8_t) |
ImageTableData_Chunk(pstruct.type) |
ImageData_Chunk(pstruct.type) |
dyn.block(int(s['Block Size'].li) |
ImageData( parray.type ) |
isTerminator(self, v) |
int(v['Block Size']) |
File(pstruct.type) |
ptypes.setsource( ptypes.provider.file('./poc.gif') |
gif.File() |
print(z.l) |
TestTranforms(BytecodeTestCase) |
test_unot(self) |
unot(x) |
self.assertNotInBytecode(unot, 'UNARY_NOT') |
self.assertNotInBytecode(unot, 'POP_JUMP_IF_FALSE') |
self.assertInBytecode(unot, 'POP_JUMP_IF_TRUE') |
test_elim_inversion_of_is_or_in(self) |
compile(line, '', 'single') |
self.assertInBytecode(code, 'COMPARE_OP', cmp_op) |
test_global_as_constant(self) |
f() |
g() |
h() |
in ((f, None) |
self.assertNotInBytecode(func, 'LOAD_GLOBAL') |
self.assertInBytecode(func, 'LOAD_CONST', elem) |
f() |
self.assertNotInBytecode(f, 'LOAD_GLOBAL') |
self.assertInBytecode(f, 'LOAD_CONST', None) |
test_while_one(self) |
f() |
in ('LOAD_CONST', 'POP_JUMP_IF_FALSE') |
self.assertNotInBytecode(f, elem) |
in ('JUMP_ABSOLUTE',) |
self.assertInBytecode(f, elem) |
test_pack_unpack(self) |
compile(line,'','single') |
self.assertInBytecode(code, elem) |
self.assertNotInBytecode(code, 'BUILD_TUPLE') |
self.assertNotInBytecode(code, 'UNPACK_TUPLE') |
test_folding_of_tuples_of_constants(self) |
constant (1,2,3) |
compile(line,'','single') |
self.assertInBytecode(code, 'LOAD_CONST', elem) |
self.assertNotInBytecode(code, 'BUILD_TUPLE') |
compile(repr(tuple(range(10000) |
self.assertNotInBytecode(code, 'BUILD_TUPLE') |
dis.get_instructions(code) |
self.assertEqual(len(load_consts) |
crater() |
test_folding_of_lists_of_constants(self) |
compile(line, '', 'single') |
self.assertInBytecode(code, 'LOAD_CONST', elem) |
self.assertNotInBytecode(code, 'BUILD_LIST') |
test_folding_of_sets_of_constants(self) |
frozenset({1, 2, 3}) |
frozenset({'a', 'c', 'b'}) |
frozenset({1, None}) |
frozenset({(1, 2) |
frozenset({1, 2, 3}) |
compile(line, '', 'single') |
self.assertNotInBytecode(code, 'BUILD_SET') |
self.assertInBytecode(code, 'LOAD_CONST', elem) |
f(a) |
g(a) |
self.assertTrue(f(3) |
self.assertTrue(not f(4) |
self.assertTrue(not g(3) |
self.assertTrue(g(4) |
test_folding_of_binops_on_constants(self) |
fold
('"@"*4', '@@@@') |
ops
('a="abc" + "def"', 'abcdef') |
ops
('a = 3**4', 81) |
power
('a = 3*4', 12) |
multiply
('a = 13//4', 3) |
divide
('a = 14%4', 2) |
modulo
('a = 2+3', 5) |
add
('a = 13-4', 9) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.