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

Write PyTests for Stock #3

Open
AlbertRtk opened this issue Nov 29, 2020 · 10 comments
Open

Write PyTests for Stock #3

AlbertRtk opened this issue Nov 29, 2020 · 10 comments

Comments

@AlbertRtk
Copy link
Owner

Write tests for all classes/methods/functions in the file stock.py

@AlbertRtk AlbertRtk created this issue from a note in marketools development (To do) Nov 29, 2020
@tandrade96
Copy link

All the tests are failling with pytest

image

@AlbertRtk
Copy link
Owner Author

@tandrade96 what is the working directory path you are running the tests from?

@tandrade96
Copy link

/marketools <= running from here
/marketools
/analysys
/stqscraper
/tests

@AlbertRtk
Copy link
Owner Author

image

It works for me, perhaps it is some issue with operating system. Are you running it on Windows? I personally use Kubuntu.

@tandrade96
Copy link

tandrade96 commented Dec 2, 2020 via email

@AlbertRtk
Copy link
Owner Author

@kushkansara02 did you have similar issue? What is operating system you use?

@kushkansara02
Copy link
Contributor

kushkansara02 commented Dec 2, 2020

Screen Shot 2020-12-02 at 2 18 26 PM
I tested test_wallet.py, passed all tests. I'm on MacOS

@tandrade96
Copy link

tandrade96 commented Dec 2, 2020 via email

@kushkansara02
Copy link
Contributor

kushkansara02 commented Dec 2, 2020

I use PyCharm. I set the working directory to the root directory (marketools/), and set up a test at the path of test_wallet.py (You can also set the path to the tests folder and pytest will execute all tests within that directory). When I executed that test, everything worked fine.

@tandrade96
Copy link

Solved it, thanks guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

3 participants