From a361b79c809ba8689a76a6318a415b3e5195a265 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Mar 2024 21:06:18 -0400 Subject: [PATCH] Ensure that sys.argv is in a known state before parsing args. Closes #4. --- jaraco/nxt/controller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/jaraco/nxt/controller.py b/jaraco/nxt/controller.py index 1e78105..109eae2 100644 --- a/jaraco/nxt/controller.py +++ b/jaraco/nxt/controller.py @@ -129,6 +129,7 @@ def _get_options(): """ Get options for the NXT device as well as the MotorController. + >>> import sys; getfixture('monkeypatch').setattr(sys, 'argv', sys.argv[:1]) >>> options = _get_options() Note that the test above will fail with optparse.OptionConflictError