@@ -339,14 +339,17 @@ def test_invalid_indexer(self):
339339 # mangle things so we can test AssertionError at end
340340 # get_indexer()
341341 from roundup .configuration import IndexerOption
342- IndexerOption .allowed .append ("unrecognized_indexer" )
342+ io_orig = IndexerOption .allowed
343+ io = list (io_orig )
344+ io .append ("unrecognized_indexer" )
345+ IndexerOption .allowed = tuple (io )
343346 self .db .config ['INDEXER' ] = "unrecognized_indexer"
344347
345348 with self .assertRaises (AssertionError ) as cm :
346349 indexer = get_indexer (self .db .config , self .db )
347350
348351 # unmangle state
349- IndexerOption .allowed . pop ()
352+ IndexerOption .allowed = io_orig
350353 self .assertNotIn ("unrecognized_indexer" , IndexerOption .allowed )
351354 self .db .config ['INDEXER' ] = ""
352355
@@ -580,7 +583,10 @@ def test_invalid_language(self):
580583 import psycopg2
581584
582585 from roundup .configuration import IndexerOption
583- IndexerOption .valid_langs .append ("foo" )
586+ io_orig = IndexerOption .valid_langs
587+
588+ io = list (io_orig )
589+ io .append ("foo" )
584590 self .db .config ["INDEXER_LANGUAGE" ] = "foo"
585591
586592 with self .assertRaises (psycopg2 .errors .UndefinedObject ) as ctx :
@@ -596,6 +602,7 @@ def test_invalid_language(self):
596602 self .db .rollback ()
597603
598604 self .db .config ["INDEXER_LANGUAGE" ] = "english"
605+ IndexerOption .valid_langs = io_orig
599606
600607 def testNullChar (self ):
601608 """Test with null char in string. Postgres FTS throws a ValueError
0 commit comments