44## Contents
55
66 * [ Steps] ( #steps )
7- * [ 1. Create the test file] ( #1-create-the-test-file )
8- * [ 2. Run the test] ( #2-run-the-test )
7+ * [ 1. Install the dependencies] ( #1-install-the-dependencies )
8+ * [ 2. Create the test file] ( #2-create-the-test-file )
9+ * [ 3. Run the test] ( #3-run-the-test )
910 * [ Section 1: Run Information] ( #section-1-run-information )
1011 * [ Section 2: ApprovalTests diff report] ( #section-2-approvaltests-diff-report )
1112 * [ Section 3: How to approve the new result] ( #section-3-how-to-approve-the-new-result )
1213 * [ Section 4: Summary] ( #section-4-summary )
13- * [ 3 . Approve the results] ( #3 -approve-the-results )
14+ * [ 4 . Approve the results] ( #4 -approve-the-results )
1415 * [ Unix] ( #unix )
15- * [ Windows] ( #windows )
16- * [ 4. Rerun the tests] ( #4-rerun-the-tests ) <!-- endToc -->
16+ * [ Windows (cmd.exe)] ( #windows-cmdexe )
17+ * [ Windows (PowerShell)] ( #windows-powershell )
18+ * [ 5. Rerun the tests] ( #5-rerun-the-tests ) <!-- endToc -->
1719
1820## Steps
1921
20- ### 1. Create the test file
22+ ### 1. Install the dependencies
23+
24+ ``` bash
25+ pip install pytest approvaltests
26+ ```
27+
28+ ### 2. Create the test file
2129
2230Add a new file called ` test_with_approvals.py `
2331
@@ -32,7 +40,7 @@ def test_with_approvals():
3240 verify(" Hello World" , options = Options().with_reporter(PythonNativeReporter()))
3341```
3442
35- ### 2 . Run the test
43+ ### 3 . Run the test
3644
3745Run the test in the terminal:
3846
@@ -114,7 +122,7 @@ FAILED test_with_approvals.py::test_with_approvals - approvaltests.approval_exce
114122
115123The above summarizes the results of all (1) of the tests run in the session.
116124
117- ### 3 . Approve the results
125+ ### 4 . Approve the results
118126
119127Copy the ` .received. ` to the ` .approved. `
120128
@@ -123,13 +131,18 @@ Copy the `.received.` to the `.approved.`
123131``` bash
124132mv -f " test_with_approvals.test_with_approvals.received.txt" " test_with_approvals.test_with_approvals.approved.txt"
125133```
126- #### Windows
134+ #### Windows (cmd.exe)
127135
128136``` bash
129137move " test_with_approvals.test_with_approvals.received.txt" " test_with_approvals.test_with_approvals.approved.txt"
130138```
139+ #### Windows (PowerShell)
140+
141+ ``` powershell
142+ Move-Item -Force "test_with_approvals.test_with_approvals.received.txt" "test_with_approvals.test_with_approvals.approved.txt"
143+ ```
131144
132- ### 4 . Rerun the tests
145+ ### 5 . Rerun the tests
133146
134147Run the test in the terminal:
135148
0 commit comments