Tribler / bami

BAMI 🍜 protocol prototype: Ultimate Toolbox for Collaboration
9 stars 9 forks source link

WIP: Unite set_vals implementations #53

Closed Solomon1732 closed 3 years ago

Solomon1732 commented 3 years ago

United the set_vals implementations under one class. This is to avoid code reduplication.

This is very much a WIP, and feedback for how to structure the code is desired.

Fixes #45

Solomon1732 commented 3 years ago

This seems to be the failure. What does it mean? 😅 Aside for #52 local tests pass without issues.

ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    coverage[toml] from https://files.pythonhosted.org/packages/e4/6a/fa167da3ac886b4777bfe37a86a2d664637dff12837dd6187ce9cdd5eb70/coverage-5.3-cp38-cp38-manylinux1_x86_64.whl#sha256=0f313707cdecd5cd3e217fc68c78a960b616604b559e9ea60cc16795c4304259
Session tests failed.
Ran multiple sessions:
* black: failed
* tests: failed
Error: Process completed with exit code 1.
devos50 commented 3 years ago

@Solomon1732 Looking at it, see #55

devos50 commented 3 years ago

Please rebase this PR on the latest commit on the master branch 👍

Solomon1732 commented 3 years ago

I did not unite the functions under one class since "if a fixture is defined inside a class, it can only be requested by tests inside that class." Trying to unite them under one class resulted in the fixtures not being visible to the test functions, or indeed, to poetry run pytest --fixtures. https://docs.pytest.org/en/stable/fixture.html#fixture-availabiility

I also did not add init_nodes as optional parameters since they are apparently not yet a feature in pytest.

Solomon1732 commented 3 years ago

Closing pull request since I messed up the history. I'll open a new one