mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-20 08:05:33 +03:00
remove unused parts of test_rom.py (#15151)
* remove unused parts of test_rom.py * remove unused code in test_compression.py
This commit is contained in:
parent
e41f710160
commit
5b0bf90a46
@ -182,16 +182,11 @@ class TestCompression:
|
||||
|
||||
|
||||
class TestDecompression:
|
||||
def __init__(self) -> None:
|
||||
self.maxDiff = None
|
||||
|
||||
def test_deserialization(self) -> None:
|
||||
self.maxDiff = None
|
||||
cost, out = DESERIALIZE_MOD.run_with_cost(INFINITE_COST, [bytes(Program.to("hello"))])
|
||||
assert out == Program.to("hello")
|
||||
|
||||
def test_deserialization_as_argument(self) -> None:
|
||||
self.maxDiff = None
|
||||
cost, out = TEST_GEN_DESERIALIZE.run_with_cost(
|
||||
INFINITE_COST, [DESERIALIZE_MOD, Nil, bytes(Program.to("hello"))]
|
||||
)
|
||||
@ -245,7 +240,6 @@ class TestDecompression:
|
||||
|
||||
def test_block_program_zero(self) -> None:
|
||||
"Decompress a list of CSEs"
|
||||
self.maxDiff = None
|
||||
cse1 = binutils.assemble( # type: ignore[no-untyped-call]
|
||||
"(((0x0000000000000000000000000000000000000000000000000000000000000000 0x0186a0) (0xb081963921826355dcb6c355ccf9c2637c18adf7d38ee44d803ea9ca41587e48c913d8d46896eb830aeadfc13144a8eac3 (() (q (51 0x6b7a83babea1eec790c947db4464ab657dbe9b887fe9acc247062847b8c2a8a9 0x0186a0)) ()))))"
|
||||
)
|
||||
@ -287,7 +281,6 @@ class TestDecompression:
|
||||
print(out)
|
||||
|
||||
def test_block_program_zero_with_curry(self) -> None:
|
||||
self.maxDiff = None
|
||||
cse1 = binutils.assemble( # type: ignore[no-untyped-call]
|
||||
"(((0x0000000000000000000000000000000000000000000000000000000000000000 0x0186a0) (0xb081963921826355dcb6c355ccf9c2637c18adf7d38ee44d803ea9ca41587e48c913d8d46896eb830aeadfc13144a8eac3 (() (q (51 0x6b7a83babea1eec790c947db4464ab657dbe9b887fe9acc247062847b8c2a8a9 0x0186a0)) ()))))"
|
||||
)
|
||||
|
@ -40,23 +40,8 @@ GENERATOR_CODE = """
|
||||
"""
|
||||
|
||||
|
||||
COMPILED_GENERATOR_CODE = bytes.fromhex(
|
||||
"ff02ffff01ff04ffff02ff04ffff04ff02ffff04ff05ffff04ff0bff8080808080ffff02"
|
||||
"ff06ffff04ff02ffff04ff05ffff04ff0bff808080808080ffff04ffff01ffff02ff05ff"
|
||||
"1380ff02ff05ff2b80ff018080"
|
||||
)
|
||||
|
||||
COMPILED_GENERATOR_CODE = bytes(Program.to(compile_clvm_text(GENERATOR_CODE, []))) # type: ignore[no-untyped-call]
|
||||
|
||||
FIRST_GENERATOR = Program.to(
|
||||
binutils.assemble( # type: ignore[no-untyped-call]
|
||||
'((parent_id (c 1 (q "puzzle blob")) 50000 "solution is here" extra data for coin))'
|
||||
)
|
||||
).as_bin()
|
||||
|
||||
SECOND_GENERATOR = Program.to(binutils.assemble("(extra data for block)")).as_bin() # type: ignore[no-untyped-call]
|
||||
|
||||
|
||||
FIRST_GENERATOR = Program.to(
|
||||
binutils.assemble( # type: ignore[no-untyped-call]
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user