def test_singleton_shared_state(self): """ Check that two instances share state. """ second = Config() second.foo = 'bar' self.assertEqual('bar', self.config.foo) self.config.bar = 'bash' self.assertEqual('bash', second.bar)