From 5116550fb8c9f45e5e6cd0c58e35d066c7afe5fd Mon Sep 17 00:00:00 2001 From: Heiko Heiko Date: Fri, 1 May 2015 11:26:08 +0200 Subject: [PATCH] test check_vm_test / fails --- ethereum/tests/test_vm_failing.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ethereum/tests/test_vm_failing.py b/ethereum/tests/test_vm_failing.py index 185ca4910..1d0d64153 100644 --- a/ethereum/tests/test_vm_failing.py +++ b/ethereum/tests/test_vm_failing.py @@ -43,3 +43,17 @@ def mk_test_func(filename, testname, testdata): if testname not in failing: continue globals()[func_name] = mk_test_func(filename, testname, testdata) + + +def test_testutils_check_vm_test(): + testutils.check_vm_test(testutils.fixture_to_bytes(testdata)) + # manipulate post data + storage = testdata['post'].values()[0]['storage'] + assert storage['0x00'][-1] != 'a' + storage['0x00'] = storage['0x00'][:-1] + 'a' + failed_as_expected = False + try: + testutils.check_vm_test(testutils.fixture_to_bytes(testdata)) + except Exception: + failed_as_expected = True + assert failed_as_expected