Pysyft: Unable to run unit tests.

Created on 31 May 2019  路  12Comments  路  Source: OpenMined/PySyft

Unable to run unit tests even after installing everything properly ( tried both pip install and the installation guide for Linux )

  • Installation is proper
    Screenshot from 2019-05-31 06-38-28

*Breaks after cd-ing into test dir
Screenshot from 2019-05-31 06-39-17
What am I missing?

Most helpful comment

Okay lesson learned. :) Thanks peeps.
python3 -m pytest test/test_serde.py

All 12 comments

@jidroid404 you can run unit tests using pytest. E.g from inside test folder run the command
pytest test_serde.py

@jidroid404 as @amit-rastogi pointed you should run the file using pytest. Also if you want to run all the unit tests you can cd to the PySyft folder and run: pytest test/*

Then throwing off this import error, while running all of the unit tests
Screenshot from 2019-06-02 18-16-19

@jidroid404 try to run as I described on my previous comment. conftest.py is not a valid unit test, so probably that's why you see the error.

Go to Desktop/PysSyft/ and run pytest test/*

This should execute without errors.

Nope,it doesn't.
issue

right... weird... can you check if you have all the dependencies installed?

run:

pip install -r requirements.txt
pip install -r requirements_dev.txt

All the dependencies are intact.

From the error details your python version appears to be 2.7. Could you check with python 3.x?

Had the same suspicion, it's Python 3.6 only.

Oh indeed @amit-rastogi, nice catch!

Not really @jidroid404 from the previous print-screen error you sent your pytest is running python2.7

Okay lesson learned. :) Thanks peeps.
python3 -m pytest test/test_serde.py

Was this page helpful?
0 / 5 - 0 ratings