<div id="comment:0"></div> When a file is marked `# sage.doctest: optional - xyz`, we omit it from doctesting unless `--optional=xyz` is given. This will save us from having to add lots of `# optional - ...` tags to files in the course of modularization (#29705) We do this by extending `sage.doctest.control.skipfile`, which already parses files for `# nodoctest` file directives. Previous related proposals/discussions: #3260, #20427 Also related: #30746 CC: @simon-king-jena @kiwifb @roed314 @saraedum @nthiery @videlec Component: **doctest framework** Keywords: **sd111** Author: **Matthias Koeppe, John Palmieri** Branch/Commit: **[`5cc1288`](https://github.com/sagemath/sagetrac-mirror/commit/5cc1288bec7a4c165723f8fd20d14843547faccc)** Reviewer: **John Palmieri, Matthias Koeppe** _Issue created by migration from https://trac.sagemath.org/ticket/30778_