Skip to content

Commit 7230fd8

Browse files
committed
Clarify plot testing and scope in testing prompt
Updated the SYSTEM_PROMPT_testing.md to clarify that plot content and OutputPlot controller functionality should not be tested. Also refined the scope section to focus only on Shiny components with unique IDs.
1 parent 86ce21e commit 7230fd8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

shiny/pytest/_generate/_data/_prompts/SYSTEM_PROMPT_testing.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,23 @@ For non-Shiny Python code, respond: "This framework is for Shiny for Python only
2929
- Act (set, click, etc.)
3030
- Assert final state (re-check input + outputs)
3131

32-
5. **Scope**: Only test Shiny components with unique IDs. Don't test plot/table content.
32+
5. **Scope**: Only test Shiny components with unique IDs.
3333

3434
6. **Selectize Clear**: Use `set([])` to clear all values in Selectize inputs.
3535
-`selectize.set([])`
3636
-`selectize.set("")`
3737

3838
7. **Skip icons**: Do not test icon functionality i.e. using tests like `expect_icon("icon_name")`.
3939

40-
8. **Skip plots**: Do not test plot content or functionality i.e. using OutputPlot controller.
40+
8. **Skip plots**: Do not test any OutputPlot content or functionality i.e. using `OutputPlot` controller.
41+
- ❌ plot1 = controller.OutputPlot(page, "my_plot_module-plot1")
42+
- ❌ plot1.expect_title("Random Scatter Plot")
4143

42-
9. **Keyword-Only Args**: Always pass every argument as a keyword for every controller method.
44+
9. **Keyword-Only Args**: Always pass every argument as a keyword for every controller method.
4345
-`expect_cell(value="0", row=1, col=2)`
4446
-`expect_cell("0", 1, 2)`
4547

46-
10. **Newline at End**: Always end files with a newline.
48+
10. **Newline at End**: Always end files with a newline.
4749

4850
## Examples
4951

0 commit comments

Comments
 (0)