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

Tests fail on fresh setup #53

Open
DarbyBurbidge opened this issue Jun 4, 2022 · 0 comments
Open

Tests fail on fresh setup #53

DarbyBurbidge opened this issue Jun 4, 2022 · 0 comments

Comments

@DarbyBurbidge
Copy link

DarbyBurbidge commented Jun 4, 2022

Subject of the issue

Tests fail on a fresh setup
Specifically tests in asa_faucet_test.py
Tests 2,3,6
errors are: "KeyError: 0"
in:
asa_faucet_test.py -> akita_inu_asa_utils.py -> get_key_from_state(state, key)

Your environment

OS:
Ubuntu 20.04 (focal, amd64)

Software version:
Algod
12885295106
3.6.2.stable [rel/stable] (commit #5e6bc6fc)

python --version
3.8.10

./sandbox goal node status
Last committed block: 22014949
Time since last block: 1.9s
Sync Time: 0.0s
Last consensus protocol: https://github.com/algorandfoundation/specs/tree/d5ac876d7ede07367dbaa26e149aa42589aac1f7
Next consensus protocol: https://github.com/algorandfoundation/specs/tree/d5ac876d7ede07367dbaa26e149aa42589aac1f7
Round for next consensus protocol: 22014950
Next consensus protocol supported: true
Last Catchpoint:
Genesis ID: testnet-v1.0
Genesis hash: SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=

pip list (I ran it twice on two computers)
Package Version
attrs 21.4.0
cffi 1.15.0
iniconfig 1.1.1
joblib 1.1.0
msgpack 1.0.4
packaging 21.3
pip 22.0.2
pluggy 1.0.0
py 1.11.0
py-algorand-sdk 1.14.0 OR 1.13.1
pycparser 2.21
pycryptodomex 3.14.1
PyNaCl 1.5.0
pyparsing 3.0.9
pyteal 0.13.0
pytest 7.1.2
setuptools 59.6.0
tomli 2.0.1
wheel 0.37.1

Steps to reproduce

  1. Setup virtual environment according to instructions here: https://realpython.com/python-virtual-environments-a-primer/
  2. Fund a Wallet and add mnemonic to .secrets
  3. Setup Docker and Docker compose as per instructions here: https://docs.docker.com/engine/install/ubuntu/
  4. Add /build in main SmartContracts folder because tests expect it to be there but it's not part of the repo (tests will fail).
  5. Run tests as per README.md using:

docker exec -it smartcontracts bash
python -m pytest

Expected behaviour:

All tests pass initially

Actual behaviour

asa_faucet_test.py tests 2, 3, and 6 fail with error: "KeyError: 0" all other tests pass.

Possible fix

remove calls to get_key_from_state(state, b'key_name') in akita_inu_asa_utils.py and refer to global/local_state['key_name'] directly in test file.
This matches syntax in other tests
see pull request here

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

No branches or pull requests

1 participant