From 3cebcf79ca28bdec8b6b965021658fb8581009ac Mon Sep 17 00:00:00 2001 From: Chris Novakovic Date: Mon, 1 Dec 2025 02:22:14 +0000 Subject: [PATCH] Allow flag to appear anywhere in arguments list in `flags` test The flag passed in the `flags` parameter of `//test:flags_test` isn't always guaranteed to be the first argument in the interpreter's arguments list - other factors, e.g. overriding the value of the plugin's `InterpreterOptions` configuration option when running the test, can affect the argument order. Relax the assertion in the test so it passes if the flag appears anywhere in the arguments list. --- test/flags_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/flags_test.py b/test/flags_test.py index c4954c43..d25289b6 100644 --- a/test/flags_test.py +++ b/test/flags_test.py @@ -7,4 +7,4 @@ class FlagsTest(unittest.TestCase): def test_flags(self): - self.assertEqual('--test_flag', sys.argv[1]) + self.assertIn("--test_flag", sys.argv)