mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-19 17:58:23 +00:00
add {.raises.}
annotations to test_fixture_operations
(#5984)
Some more progress in making exception flow explicit.
This commit is contained in:
parent
ac11f50b77
commit
4a74ef9cba
@ -5,6 +5,7 @@
|
|||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
|
{.push raises: [].}
|
||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import
|
import
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
|
{.push raises: [].}
|
||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import
|
import
|
||||||
@ -129,7 +130,7 @@ suite baseDescription & "Execution Payload " & preset():
|
|||||||
proc makeApplyExecutionPayloadCb(path: string): auto =
|
proc makeApplyExecutionPayloadCb(path: string): auto =
|
||||||
return proc(
|
return proc(
|
||||||
preState: var bellatrix.BeaconState, body: bellatrix.BeaconBlockBody):
|
preState: var bellatrix.BeaconState, body: bellatrix.BeaconBlockBody):
|
||||||
Result[void, cstring] =
|
Result[void, cstring] {.raises: [IOError].} =
|
||||||
let payloadValid = os_ops.readFile(
|
let payloadValid = os_ops.readFile(
|
||||||
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
|
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
|
||||||
).contains("execution_valid: true")
|
).contains("execution_valid: true")
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
|
{.push raises: [].}
|
||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import
|
import
|
||||||
@ -146,7 +147,7 @@ suite baseDescription & "Execution Payload " & preset():
|
|||||||
proc makeApplyExecutionPayloadCb(path: string): auto =
|
proc makeApplyExecutionPayloadCb(path: string): auto =
|
||||||
return proc(
|
return proc(
|
||||||
preState: var capella.BeaconState, body: capella.BeaconBlockBody):
|
preState: var capella.BeaconState, body: capella.BeaconBlockBody):
|
||||||
Result[void, cstring] =
|
Result[void, cstring] {.raises: [IOError].} =
|
||||||
let payloadValid = os_ops.readFile(
|
let payloadValid = os_ops.readFile(
|
||||||
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
|
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
|
||||||
).contains("execution_valid: true")
|
).contains("execution_valid: true")
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
|
{.push raises: [].}
|
||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import
|
import
|
||||||
@ -149,7 +150,7 @@ suite baseDescription & "Execution Payload " & preset():
|
|||||||
proc makeApplyExecutionPayloadCb(path: string): auto =
|
proc makeApplyExecutionPayloadCb(path: string): auto =
|
||||||
return proc(
|
return proc(
|
||||||
preState: var deneb.BeaconState, body: deneb.BeaconBlockBody):
|
preState: var deneb.BeaconState, body: deneb.BeaconBlockBody):
|
||||||
Result[void, cstring] =
|
Result[void, cstring] {.raises: [IOError].} =
|
||||||
let payloadValid = os_ops.readFile(
|
let payloadValid = os_ops.readFile(
|
||||||
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
|
OpExecutionPayloadDir/"pyspec_tests"/path/"execution.yaml"
|
||||||
).contains("execution_valid: true")
|
).contains("execution_valid: true")
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
|
{.push raises: [].}
|
||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import
|
import
|
||||||
|
Loading…
x
Reference in New Issue
Block a user