Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Days Left In Year

A small Python exercise for practising unit testing and CI/CD.

The code

DaysLeftInYear.py exposes one function:

days_left_in_year(today: date | None = None) -> int

It returns the number of days remaining in the year after today, defaulting to the current date. December 31st returns 0.

Running

python3 DaysLeftInYear.py     # print the days left today
python3 -m unittest -v        # run the test suite

Continuous integration

.github/workflows/tests.yml runs the test suite on every push and pull request, against Python 3.10, 3.11 and 3.12.

Requires Python 3.10 or newer (the date | None type hint syntax).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages