Skip to content

Commit f77e104

Browse files
authored
Merge pull request #9 from FAIR2-for-research-software/SylviaWhittle/typos
Fix typos
2 parents 5a1db60 + 729d0c1 commit f77e104

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

episodes/01-why-test-my-code.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exercises: 2
2020

2121
Software testing is the process of checking that code is working as expected. You may have data processing functions or automations that you use in your work - how do you know that they are doing what you expect them to do?
2222

23-
Software testing is most commonly done by writing code (tests) that check that your code work as expected.
23+
Software testing is most commonly done by writing code (tests) that check that your code works as expected.
2424

2525
This might seem like a lot of effort, so let's go over some of the reasons you might want to add tests to your project.
2626

@@ -38,7 +38,7 @@ def add(a, b):
3838

3939
When writing this function, I made a mistake. I accidentally wrote `a - b` instead of `a + b`. This is a simple mistake, but it could have serious consequences in a project.
4040

41-
When writing the code, I could have tested this function by manually trying it with different input and checking the output, but:
41+
When writing the code, I could have tested this function by manually trying it with different inputs and checking the output, but:
4242

4343
- This takes time.
4444
- I might forget to test it again when we make changes to the code later on.

episodes/02-simple-tests.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exercises: 2
2222
## Your first test
2323

2424
The most basic thing you will want to do in a test is check that an output for a
25-
function is correct, by checking that it is equal to a certain value.
25+
function is correct by checking that it is equal to a certain value.
2626

2727
Let's take the `add` function example from the previous chapter and the test we
2828
conceptualised for it and write it in code.

episodes/05-testing-exceptions.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ exercises: 2
66

77
:::::::::::::::::::::::::::::::::::::: questions
88

9-
- How check that a function raises an exception?
9+
- How to check that a function raises an exception?
1010

1111
::::::::::::::::::::::::::::::::::::::::::::::::
1212

episodes/07-fixtures.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ When writing more complex tests, you may find that you need to reuse data or obj
2222

2323
Here is an example of a set of tests that re-use the same data a lot.
2424
We have a class, `Point`, that represents a point in 2D space. We have a few tests that check the behaviour of the class.
25-
Notice how we have to repeat the extact same setup code in each test.
25+
Notice how we have to repeat the exact same setup code in each test.
2626

2727
```python
2828

episodes/09-testing-output-files.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Here we have told pytest that we want it to compare the output of the `test_plot
153153
(make sure you are in the base directory in your project and not in the plotting folder)
154154

155155
```bash
156-
pytest --mpl-generate-path=plotitng/test_plots
156+
pytest --mpl-generate-path=plotting/test_plots
157157
```
158158

159159
This tells pytest to run the test but instead of comparing the result, it will save the result into the `test_plots` directory for use in future tests.

episodes/10-CI.Rmd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,9 @@ Now that you have created the `tests.yaml` file, you need to upload it to GitHub
114114

115115
The typical use-case for a CI system is to run the tests whenever a pull request is made to the main branch to add a feature.
116116

117-
- Go to your GitHub repository
118-
119117
<!-- figure
120118
![branch protection visual instruction](episodes/fig/github-branch-protection.png) -->
121-
119+
- Go to your GitHub repository
122120
- Click on the "Settings" tab
123121
- Scroll down to "Branches"
124122
- Under "Branch protection rules" / "Branch name pattern" type "main"

0 commit comments

Comments
 (0)