diff --git a/11_bottles_of_beer/test.py b/11_bottles_of_beer/test.py index d9487cc82..414b017dd 100755 --- a/11_bottles_of_beer/test.py +++ b/11_bottles_of_beer/test.py @@ -32,7 +32,7 @@ def test_usage(): def test_bad_int(): """Bad integer value""" - bad = random.randint(-10, 1) + bad = random.randint(-10, 0) rv, out = getstatusoutput(f'{prg} -n {bad}') assert rv != 0 assert re.search(f'--num "{bad}" must be greater than 0', out) diff --git a/README.md b/README.md index b4debb0b7..8c5cefe1e 100644 --- a/README.md +++ b/README.md @@ -9,17 +9,17 @@ http://tinypythonprojects.com/ There is a directory for each chapter of the book. Each directory contains a `test.py` program you can use with `pytest` to check that you have written the program correctly. I have included a short README to describe each exercise. -If you have problems writing code (or if you would like to support this project!), the book contains details about the skills you need. +If you have problems writing code, see my book for the skills you need. -The testing step is integral to writing and solving these challenges as well as to the methodology of the book. -I advocate a "test-driven development" mentality where we write tests _before_ we write code. -The tests should define what it means for a program to be correct, and then we write programs to satisfy the tests. +Testing is integral to writing and solving these challenges as well as to the methodology of the book. +I advocate for "test-driven development" where you write tests _before_ you write code. +The tests should define what it means for a program to be correct, and then you write programs to satisfy the tests. In this project, I've written all the tests for you, but I also encourage you to write your own functions and tests. You should run the test suite after every change to your program to ensure you are making progress! # Videos -I've been making videos for each chapter on my YouTube channel: +I made videos for each chapter on my YouTube channel: https://www.youtube.com/user/kyclark @@ -61,14 +61,9 @@ Here are the videos I've completed so far: # Forking GitHub repo -First use the GitHub interface to "fork" this repository into your own account. Then do `git clone` of *your* repository to get a local copy. Inside that checkout, do: - -```` -git remote add upstream https://github.com/kyclark/tiny_python_projects.git -```` - -This will allow you to `git pull upstream master` in order to get updates. When you create new files, `git add/commit/push` them to *your* repository. (Please do not create pull requests on *my* repository -- unless, of course, you have suggestions for improving my repo!). +If you like, you can use the GitHub interface to _fork_ this repository into your own account. +Then do `git clone` of *your* repository to get a local copy. # Copyright -© Ken Youens-Clark 2019-2020 +© Ken Youens-Clark 2019-2024