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

[WIP] Start tests #18

Closed
wants to merge 3 commits into from
Closed

[WIP] Start tests #18

wants to merge 3 commits into from

Conversation

ajyl
Copy link
Contributor

@ajyl ajyl commented Nov 22, 2022

Started creating unittests.

NOTE: I made some changes to module import paths to use absolute paths (ex: from potato.create_task_cli import create_task_cli). This means your PYTHONPATH will need to include the path to this repo.
The easiest way to do so would be something like

$ PYTHONPATH=~/potato python potato/flask_server.py ...

or to add something like

export PYTHONPATH=$PYTHONPATH:/home/.../potato

in your bashrc file.

I am open to discuss if this is the best design choice to make! I mainly made this change such that in tests/test_server.py I can import things from potato.

In order to run the tests, run

pytest

or

(from the root of the repo directory)
PYTHONPATH=. pytest

@davidjurgens
Copy link
Owner

I think long term, we want potato to be runable via command line like python -m potato so I think this change is reasonable, though it breaks most existing installs, which is unfortunate

@ajyl
Copy link
Contributor Author

ajyl commented Nov 28, 2022

Closing, functionality of this PR can be found in #22

@ajyl ajyl closed this Nov 28, 2022
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.

2 participants