Skip to content

Commit 3cebcf7

Browse files
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.
1 parent ce5cae0 commit 3cebcf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/flags_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
class FlagsTest(unittest.TestCase):
88

99
def test_flags(self):
10-
self.assertEqual('--test_flag', sys.argv[1])
10+
self.assertIn("--test_flag", sys.argv)

0 commit comments

Comments
 (0)