When runnint test_logging with --huntrleaks after commit
18fb1fb943b7dbd7f8a76017ee2a67ef13effb85, test_out_of_order fails
to raise ValueError due to the fact that the new test
test_out_of_order_with_dollar_style mutates the out_of_order
dictionary. Even if the test copies the dictionary first, the mutation
is done in a very deep level so the original one is also affected.
import codecs
import configparser
+import copy
import datetime
import pathlib
import pickle
self.assertRaises(ValueError, self.apply_config, self.out_of_order)
def test_out_of_order_with_dollar_style(self):
- config = self.out_of_order.copy()
+ config = copy.deepcopy(self.out_of_order)
config['formatters']['mySimpleFormatter']['format'] = "${asctime} (${name}) ${levelname}: ${message}"
self.apply_config(config)