Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

How to run tests? #100

Closed
yurivict opened this issue Apr 9, 2021 · 2 comments
Closed

How to run tests? #100

yurivict opened this issue Apr 9, 2021 · 2 comments

Comments

@yurivict
Copy link

yurivict commented Apr 9, 2021

README says: $ python3 setup.py test but when this command is run it says:

WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing python_gist.egg-info/PKG-INFO
writing dependency_links to python_gist.egg-info/dependency_links.txt
writing entry points to python_gist.egg-info/entry_points.txt
writing requirements to python_gist.egg-info/requires.txt
writing top-level names to python_gist.egg-info/top_level.txt
reading manifest file 'python_gist.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_gist.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
@jdowner
Copy link
Owner

jdowner commented Apr 9, 2021

Sorry, that should be updated. To run the unit tests you need to have poetry installed and run,

make test

@jdowner jdowner closed this as completed Apr 9, 2021
@jdowner jdowner reopened this Apr 10, 2021
@jdowner
Copy link
Owner

jdowner commented Apr 10, 2021

Sorry, that should be updated. To run the unit tests you need to have poetry installed and run,

make test

whoops! nope, that isn't the case in master. As the warning above indicates, using python setup.py test is deprecated, so going forward that is not something that is going to be supported. At the moment, in master, you can need to create a virtual environment, install the test dependencies, and invoke the test via make,

python3 -m venv venv
source venv/bin/activate
pip install -r requirements-test.txt
make test

However, this is temporary because I am transitioning to using poetry to manage the dependencies in the future. Then it won't be necessary to explicitly create the virtual environment.

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

No branches or pull requests

2 participants