Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP-210: Add BLOCKHASH contract tests #641

Closed
wants to merge 3 commits into from

Conversation

chfast
Copy link
Member

@chfast chfast commented Jun 1, 2017

I started writing tests for BLOCKHASH contract using pyethereum and py.test.

@chfast chfast force-pushed the eip96-tests branch 6 times, most recently from 3311515 to 1761460 Compare June 2, 2017 12:52
@pirapira
Copy link
Member

pirapira commented Jun 6, 2017

When I tried to follow the commands, I saw

============================= test session starts ==============================
platform linux -- Python 3.6.1, pytest-3.0.7, py-1.4.33, pluggy-0.4.0
rootdir: /home/yh/src/EIPs/EIPS/eip-96/tests, inifile:
plugins: timeout-1.0.0, catchlog-1.2.2
collected 20785 items / 11 errors

==================================== ERRORS ====================================
_ ERROR collecting env/lib/python3.6/site-packages/ethereum/tests/test_abi.py __
env/lib/python3.6/site-packages/ethereum/tests/test_abi.py:438: in pytest_generate_tests
    testutils.generate_test_params('ABITests', metafunc)
env/lib/python3.6/site-packages/ethereum/testutils.py:603: in generate_test_params
    os.path.join(fixture_path, testsource))
env/lib/python3.6/site-packages/ethereum/testutils.py:544: in get_tests_from_file_or_dir
    for f in os.listdir(dname):
E   FileNotFoundError: [Errno 2] No such file or directory: '/home/yh/src/EIPs/EIPS/eip-96/tests/env/lib/python3.6/site-packages/ethereum/../fixtures/ABITests'

with more similar errors.

@chfast
Copy link
Member Author

chfast commented Jul 28, 2017

@Arachnid @vbuterin here are my tests for original BLOCKHASH contract. I can integrate them to something else you have have something else.

@Arachnid
Copy link
Contributor

This is a courtesy notice to let you know that the format for EIPs has been modified slightly. If you want your draft merged, you will need to make some small changes to how your EIP is formatted:

  • Frontmatter is now contained between lines with only a triple dash ('---')
  • Headers in the frontmatter are now lowercase.

If your PR is editing an existing EIP rather than creating a new one, this has already been done for you, and you need only rebase your PR.

In addition, a continuous build has been setup, which will check your PR against the rules for EIP formatting automatically once you update your PR. This build ensures all required headers are present, as well as performing a number of other checks.

Please rebase your PR against the latest master, and edit your PR to use the above format for frontmatter. For convenience, here's a sample header you can copy and adapt:

---
eip: <num>
title: <title>
author: <author>
type: [Standards Track|Informational|Meta]
category: [Core|Networking|Interface|ERC] (for type: Standards Track only)
status: Draft
created: <date>
---

@chfast chfast changed the base branch from vbuterin-patch-4 to master May 17, 2018 15:47
@chfast chfast changed the title EIP-96: Add BLOCKHASH contract tests EIP-210: Add BLOCKHASH contract tests May 17, 2018
@Arachnid
Copy link
Contributor

Thank you for writing these. Do they really belong in the EIPs repo, though?

@chfast
Copy link
Member Author

chfast commented May 18, 2018

Not sure, can be moved to its own repo. This is still work in progress. I need unit tests to be able to optimize the contract source code.

@axic
Copy link
Member

axic commented Oct 16, 2018

@chfast are you still pursuing this? Would need to be rebased/merged onto master first.

@chfast
Copy link
Member Author

chfast commented Oct 16, 2018

There were some voices not to keep the test cases in the EIP repo. I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants