File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,20 @@ The `pass` statement at the end is just a no-op.
242
242
243
243
Remember, write test * cases* before you write test * code* .
244
244
245
+ Before continuing, run this test to make sure everything is set up correctly:
246
+
247
+ ``` bash
248
+ $ python3 -m pytest tests
249
+ ```
250
+
251
+ pytest should discover, run, and pass the single test case under the ` tests ` directory.
252
+
253
+ * A note about the pytest command:*
254
+ Many online articles and examples use the ` pytest ` command directly to run tests, like this: ` pytest tests ` .
255
+ Unfortunately, this version of the command does ** not** add the current directory to the Python path.
256
+ If your tests reference anything outside of their test modules, then the command will fail.
257
+ Therefore, I always recommend running the full ` python3 -m pytest tests ` command.
258
+
245
259
246
260
### Part 2: First steps with Playwright
247
261
You can’t perform that action at this time.
0 commit comments