Skip to content

Commit e2e1c9e

Browse files
committed
differences for PR #543
1 parent 567d289 commit e2e1c9e

9 files changed

Lines changed: 33 additions & 33 deletions

‎20-section2-intro.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ In this section we will:
5252
a free and open source Python library to help us structure and run automated tests.
5353
- Design, write and run **unit tests** using Pytest
5454
to verify the correct behaviour of code and identify faults,
55-
making use of test **parameterisation**
55+
making use of test **parametrization**
5656
to increase the number of different test cases we can run.
5757
- Automatically run a set of unit tests using **GitHub Actions** -
5858
a **Continuous Integration** infrastructure that allows us to
@@ -65,7 +65,7 @@ In this section we will:
6565
:::::::::::::::::::::::::::::::::::::::: keypoints
6666

6767
- Using testing requires us to change our practice of code development, but saves time in the long run by allowing us to more comprehensively and rapidly find faults in code, as well as giving us greater confidence in the correctness of our code.
68-
- The use of test techniques and infrastructures such as **parameterisation** and **Continuous Integration** can help scale and further automate our testing process.
68+
- The use of test techniques and infrastructures such as **parametrization** and **Continuous Integration** can help scale and further automate our testing process.
6969

7070
::::::::::::::::::::::::::::::::::::::::::::::::::
7171

‎22-scaling-up-unit-testing.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exercises: 5
66

77
::::::::::::::::::::::::::::::::::::::: objectives
88

9-
- Use parameterisation to automatically run tests over a set of inputs
9+
- Use parametrization to automatically run tests over a set of inputs
1010
- Use code coverage to understand how much of our code is being tested using unit tests
1111

1212
::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -28,15 +28,15 @@ How can we make our job of writing tests more efficient?
2828
And importantly, as the number of tests increases,
2929
how can we determine how much of our code base is actually being tested?
3030

31-
## Parameterising Our Unit Tests
31+
## Parametrizing Our Unit Tests
3232

3333
So far, we have been writing a single function for every new test we need.
3434
But when we simply want to use the same test code but with different data for another test,
3535
it would be great to be able to specify multiple sets of data to use with the same test code.
36-
Test **parameterisation** gives us this.
36+
Test **parametrization** gives us this.
3737

3838
So instead of writing a separate function for each different test,
39-
we can **parameterise** the tests with multiple test inputs.
39+
we can **parametrize** the tests with multiple test inputs.
4040
For example, in `tests/test_models.py` let us rewrite
4141
the `test_daily_mean_zeros()` and `test_daily_mean_integers()`
4242
into a single test function:
@@ -56,15 +56,15 @@ def test_daily_mean(test, expected):
5656
```
5757

5858
Here, we use Pytest's **mark** capability to add metadata to this specific test -
59-
in this case, marking that it is a parameterised test.
60-
`parameterize()` function is actually a
59+
in this case, marking that it is a parametrized test.
60+
`parametrize()` function is actually a
6161
[Python **decorator**](https://www.programiz.com/python-programming/decorator).
6262
A decorator, when applied to a function,
6363
adds some functionality to it when it is called, and here,
6464
what we want to do is specify multiple input and expected output test cases
6565
so the function is called over each of these inputs automatically when this test is called.
6666

67-
We specify these as arguments to the `parameterize()` decorator,
67+
We specify these as arguments to the `parametrize()` decorator,
6868
firstly indicating the names of these arguments that will be
6969
passed to the function (`test`, `expected`),
7070
and secondly the actual arguments themselves that correspond to each of these names -
@@ -83,9 +83,9 @@ and adding more tests scales better as our code becomes more complex.
8383

8484
::::::::::::::::::::::::::::::::::::::: challenge
8585

86-
## Exercise: Write Parameterised Unit Tests
86+
## Exercise: Write Parametrized Unit Tests
8787

88-
Rewrite your test functions for `daily_max()` and `daily_min()` to be parameterised,
88+
Rewrite your test functions for `daily_max()` and `daily_min()` to be parametrized,
8989
adding in new test cases for each of them.
9090

9191
::::::::::::::: solution
@@ -131,7 +131,7 @@ Let us commit our revised `test_models.py` file and test cases to our `test-suit
131131

132132
```bash
133133
$ git add tests/test_models.py
134-
$ git commit -m "Add parameterisation mean, min, max test cases"
134+
$ git commit -m "Add parametrization mean, min, max test cases"
135135
```
136136

137137
## Code Coverage - How Much of Our Code is Tested?
@@ -361,7 +361,7 @@ to learn more about code coverage.
361361

362362
:::::::::::::::::::::::::::::::::::::::: keypoints
363363

364-
- We can assign multiple inputs to tests using parametrisation.
364+
- We can assign multiple inputs to tests using parametrization.
365365
- it is important to understand the **coverage** of our tests across our code.
366366
- Writing unit tests takes time, so apply them where it makes the most sense.
367367

‎24-diagnosing-issues-improving-robustness.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ The debugger has its own commands that you can read about in
423423
## Corner or Edge Cases
424424

425425
The test case that we have currently written for `patient_normalise`
426-
is parameterised with a fairly standard data array.
426+
is parametrized with a fairly standard data array.
427427
However, when writing your test cases,
428-
it is important to consider parameterising them by unusual or extreme values,
428+
it is important to consider parametrizing them by unusual or extreme values,
429429
in order to test all the edge or corner cases that your code could be exposed to in practice.
430430
Generally speaking, it is at these extreme cases that you will find your code failing,
431431
so it is beneficial to test them beforehand.
@@ -454,7 +454,7 @@ so this will clearly break if we are dividing by zero here,
454454
resulting in `NaN` values in the normalised array.
455455

456456
With all this in mind,
457-
let us add a few edge cases to our parametrisation of `test_patient_normalise`.
457+
let us add a few edge cases to our parametrization of `test_patient_normalise`.
458458
We will add two extra tests,
459459
corresponding to an input array of all 0,
460460
and an input array of all 1.
@@ -519,7 +519,7 @@ def patient_normalise(data):
519519
## Exercise: Exploring Tests for Edge Cases
520520

521521
Think of some more suitable edge cases to test our `patient_normalise()` function
522-
and add them to the parametrised tests.
522+
and add them to the parametrized tests.
523523
After you have finished remember to commit your changes.
524524

525525
::::::::::::::: solution

‎functional-programming.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ For example, you may want to define the success criteria for a trial if, say,
719719

720720
Finally, we will look at one last aspect of Python where functional programming is coming handy.
721721
As we have seen in the
722-
[episode on parametrising our unit tests](../episodes/22-scaling-up-unit-testing.md#parameterising-our-unit-tests),
722+
[episode on parametrizing our unit tests](../episodes/22-scaling-up-unit-testing.md#parametrizing-our-unit-tests),
723723
a decorator can take a function, modify/decorate it, then return the resulting function.
724724
This is possible because Python treats functions as first-class objects
725725
that can be passed around as normal data.

‎index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ After going through this course, participants will be able to:
7979
- Set up and use a suitable development environment
8080
together with popular source code management infrastructure to develop software collaboratively
8181
- Use a test framework to automate the verification of correct behaviour of code,
82-
and employ parameterisation and continuous integration to scale and further automate code testing
82+
and employ parametrization and continuous integration to scale and further automate code testing
8383
- Design robust, extensible software through the application of suitable programming paradigms
8484
and design techniques
8585
- Understand the code review process and employ it to improve the quality of code

‎md5sum.txt‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"GOVERNANCE.md" "1f88b73f5adbcf392ea236ca7a47bdf5" "site/built/GOVERNANCE.md" "2026-03-17"
44
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2024-12-06"
55
"config.yaml" "c42cb088f8e8f6f06bfb27323d5d3a9d" "site/built/config.yaml" "2025-07-30"
6-
"index.md" "ae0548733ebfe22563ab53dcbb961b1f" "site/built/index.md" "2026-03-17"
6+
"index.md" "d6dc6b23019b5d9f54c270205ebc3104" "site/built/index.md" "2026-09-03"
77
"links.md" "832e810282e874c7a9c85c0f188695db" "site/built/links.md" "2026-05-26"
8-
"paper.md" "6f5f7ec22f895ea5fd49d6bf0016a2ee" "site/built/paper.md" "2024-12-06"
8+
"paper.md" "4caaf48847d6107ed886566e32351545" "site/built/paper.md" "2026-09-03"
99
"episodes/00-setting-the-scene.md" "020d8d4e32a85ad95e2b96d00c99dbcf" "site/built/00-setting-the-scene.md" "2026-02-24"
1010
"episodes/10-section1-intro.md" "98dbab7ab51501b2a05dc1a354d236c1" "site/built/10-section1-intro.md" "2026-02-24"
1111
"episodes/11-software-project.md" "8cd7de7de6f5b06dc6bb1d38b2789d89" "site/built/11-software-project.md" "2026-05-05"
@@ -15,11 +15,11 @@
1515
"episodes/15-coding-conventions.md" "48470b100b3b1854e6290c962ec674ab" "site/built/15-coding-conventions.md" "2025-07-30"
1616
"episodes/16-verifying-code-style-linters.md" "3eaf555ddb7c90a7c984db164f22df39" "site/built/16-verifying-code-style-linters.md" "2025-07-30"
1717
"episodes/17-section1-optional-exercises.md" "3548beb53807f5f53edd216bd4f0ade0" "site/built/17-section1-optional-exercises.md" "2025-07-30"
18-
"episodes/20-section2-intro.md" "1175d299ae840f65c569b8a15dd8950b" "site/built/20-section2-intro.md" "2026-02-24"
18+
"episodes/20-section2-intro.md" "f969ebb3b1c0f7d1571ba31ed15a2479" "site/built/20-section2-intro.md" "2026-09-03"
1919
"episodes/21-automatically-testing-software.md" "648ba49294b582c40e432fca9fe6eb2d" "site/built/21-automatically-testing-software.md" "2025-07-30"
20-
"episodes/22-scaling-up-unit-testing.md" "049c86638afb5e99590dbf04a3f92f61" "site/built/22-scaling-up-unit-testing.md" "2025-03-07"
20+
"episodes/22-scaling-up-unit-testing.md" "a5a7f57b8866278c5a1839b988e72670" "site/built/22-scaling-up-unit-testing.md" "2026-09-03"
2121
"episodes/23-continuous-integration-automated-testing.md" "c894f8a7c0c500ea84ae5dd1914b36aa" "site/built/23-continuous-integration-automated-testing.md" "2026-01-27"
22-
"episodes/24-diagnosing-issues-improving-robustness.md" "70ef28931e1477dd5fe13a4204dc614f" "site/built/24-diagnosing-issues-improving-robustness.md" "2025-07-30"
22+
"episodes/24-diagnosing-issues-improving-robustness.md" "c4a2f25ac76c5a69847390580babb59d" "site/built/24-diagnosing-issues-improving-robustness.md" "2026-09-03"
2323
"episodes/25-section2-optional-exercises.md" "439682a4955568fa290b79ab2b486797" "site/built/25-section2-optional-exercises.md" "2024-12-06"
2424
"episodes/30-section3-intro.md" "a5e1770319de8a6a87355453d3cf2fc7" "site/built/30-section3-intro.md" "2026-02-24"
2525
"episodes/31-software-requirements.md" "adf1d73eb1d6449a95378b3f931327e2" "site/built/31-software-requirements.md" "2025-02-25"
@@ -43,15 +43,15 @@
4343
"learners/software-architecture-extra.md" "75cca9330b84bddf8223944131639f4f" "site/built/software-architecture-extra.md" "2024-12-06"
4444
"learners/programming-paradigms.md" "2c3cdee71c1c975c0cf99260493b6e67" "site/built/programming-paradigms.md" "2024-12-06"
4545
"learners/procedural-programming.md" "ede81ccae989c46e47af0417ac31b401" "site/built/procedural-programming.md" "2024-12-06"
46-
"learners/functional-programming.md" "6e68bd30935f968e283bf1ecf5160edf" "site/built/functional-programming.md" "2024-12-06"
47-
"learners/object-oriented-programming.md" "cde54aa934af3c87cc5224ef45775975" "site/built/object-oriented-programming.md" "2024-12-06"
46+
"learners/functional-programming.md" "56730f85862318fd725a272d0084774b" "site/built/functional-programming.md" "2026-09-03"
47+
"learners/object-oriented-programming.md" "a392cd6ed6a5dca3507648f5261fa461" "site/built/object-oriented-programming.md" "2026-09-03"
4848
"learners/persistence.md" "86e55224911506ab5b62abac5f002854" "site/built/persistence.md" "2024-12-06"
4949
"learners/databases.md" "4954ff7461b7fdb63913df9719f16ad2" "site/built/databases.md" "2024-12-06"
5050
"learners/reference.md" "d5d60c894664895ab3423a31bd1e2aaa" "site/built/reference.md" "2024-12-06"
5151
"learners/setup.md" "40152bacaaf6822060a3619605a98efa" "site/built/setup.md" "2025-07-30"
5252
"profiles/learner-profiles.md" "3ebd2ee9244809b40c96c26ab0334997" "site/built/learner-profiles.md" "2026-01-28"
5353
"slides/section_1_setting_up_environment.md" "65631efd5db06ee9335f3ef026bdab72" "site/built/section_1_setting_up_environment.md" "2025-05-27"
54-
"slides/section_2_ensuring_correctness.md" "9ff6a044969f7959e32ffd1d9c60edd8" "site/built/section_2_ensuring_correctness.md" "2025-05-27"
54+
"slides/section_2_ensuring_correctness.md" "efda7af58ef137e04d28f102bdac0dff" "site/built/section_2_ensuring_correctness.md" "2026-09-03"
5555
"slides/section_3_software_dev_process.md" "2f273ac5d34158dfc0cd0e98c8308c82" "site/built/section_3_software_dev_process.md" "2025-05-27"
5656
"slides/section_4_collaborative_soft_dev.md" "3836b03a8dbd8b09a5f8ed7eff66f293" "site/built/section_4_collaborative_soft_dev.md" "2025-07-30"
5757
"slides/section_5_managing_software.md" "378f9bc03723cc1113cc4766df35186d" "site/built/section_5_managing_software.md" "2025-05-27"

‎object-oriented-programming.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ print(obs)
504504
```
505505

506506
You may recognise the `@` syntax from episodes on
507-
parameterising unit tests and functional programming -
507+
parametrizing unit tests and functional programming -
508508
`property` is another example of a **decorator**.
509509
In this case the `property` decorator is taking the `last_observation` function
510510
and modifying its behaviour,

‎paper.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ designing, building, releasing, and maintaining software.
9999
After going through this course, participants will be able to:
100100

101101
* Set up and use a suitable development environment together with popular source code management infrastructure to develop software collaboratively
102-
* Use a test framework to automate the verification of correct behaviour of code, and employ parameterisation and continuous integration to scale and further automate code testing
102+
* Use a test framework to automate the verification of correct behaviour of code, and employ parametrization and continuous integration to scale and further automate code testing
103103
* Design robust, extensible software through the application of suitable programming paradigms and design techniques
104104
* Understand the code review process and employ it to improve the quality of code
105105
* Prepare and release software for reuse by others

‎section_2_ensuring_correctness.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,21 @@ Start from this section heading and go to the end of the page.
9797
<!-- #region slideshow={"slide_type": "slide"} -->
9898
## Scaling Up Unit Testing
9999

100-
1. Parameterise our tests to reduce repetition
100+
1. Parametrize our tests to reduce repetition
101101
2. Check the test coverage of our code
102102
<!-- #endregion -->
103103

104104
<!-- #region slideshow={"slide_type": "notes"} -->
105-
1. Parameterise our tests
105+
1. Parametrize our tests
106106
- from the previous example, you may have noticed that if you want to run a test with the same logic but different input data, you will need to create a new test function that is mostly the same
107-
- there is a convenient way to avoid this in pytest called _parameterisation_, allowing a single test function to run through a variety of test input cases
107+
- there is a convenient way to avoid this in pytest called _parametrization_, allowing a single test function to run through a variety of test input cases
108108
- very powerful to improve the coverage of the parameter space that you code might be dealing with
109109
2. Check the test coverage
110110
- on a related note, it is important to see how much of our code is "covered" (i.e. verified) by our tests so that we can get at least a relative idea of how the quality of our code is faring overtime, and where we should focus testing efforts
111111
<!-- #endregion -->
112112

113113
<!-- #region slideshow={"slide_type": "subslide"} -->
114-
### Breakout Exercise: 🖉 Parameterising Our Unit Tests
114+
### Breakout Exercise: 🖉 Parametrizing Our Unit Tests
115115

116116
Go through this page to the end, starting from this section heading. In the last 5-7 minutes, please think about the question:
117117

0 commit comments

Comments
 (0)