Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cryptocurrency

You have some amount of cryptocurrency "Matecoin" in your online wallet. You also bought a program (function get_exchange_rate_prediction) that can predict the exchange rate of your cryptocurrency for the next day.

Inside app/test_main.py, write tests for cryptocurrency_action function. This function takes current_rate - current exchange rate of cryptocurrency. This function should return:

  • "Buy more cryptocurrency", if predicted exchange rate is more than 5% higher from the current.
  • "Sell all your cryptocurrency", if predicted exchange rate is more than 5% lower from the current.
  • "Do nothing", if difference is not that much.

Mock get_exchange_rate_prediction function.

Run pytest app/ to check if function pass your tests.

Run pytest --numprocesses=auto tests/ to check if your tests cover all boundary conditions and pass task tests.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages