testing

"Exec Dash" Project - Automated Testing Challenges

Formatting Prices

Refactor price-formatting logic into a function called something like to_usd(), and implement a corresponding test called something like test_to_usd().

Test various scenarios to ensure the price formatting function displays a dollar sign, two decimal places, and a thousands separator.

Identifying Top Sellers

Refactor top-selling product identification logic into a function called something like get_top_sellers(), and implement a corresponding test called something like test_top_sellers().

Include an example valid monthly sales CSV file somewhere in your test directory, and have your test read the sales data from this file.

Test to ensure the function converts the example sales data into a list of top selling products. What should the resulting data structure look like?

Last updated