> Thanks for reviewing. Mostly, I updated the code per you suggestion. Some will update on my follow up branch. See inline comments.
>> - for model in self.models.values():
>> + for model in list(self.models.values()):
>
> I changed it back. Maybe this is something added for debugging an issue.
I wrote that code for a reason. For you. If you don't understand it, you should ask me.
Specifically, the length of self.models.values changes during iteration. You will see a warning about that when you run the tests. listifying self.models.values fixes that problem.
The length of self.models.values changes because FakeEnvironmentState.destroy_model does:
del self.controller.models[self.name]
> Thanks for reviewing. Mostly, I updated the code per you suggestion. Some will update on my follow up branch. See inline comments. values( ): models. values( )):
>> - for model in self.models.
>> + for model in list(self.
>
> I changed it back. Maybe this is something added for debugging an issue.
I wrote that code for a reason. For you. If you don't understand it, you should ask me.
Specifically, the length of self.models.values changes during iteration. You will see a warning about that when you run the tests. listifying self.models.values fixes that problem.
The length of self.models.values changes because FakeEnvironment State.destroy_ model does: .models[ self.name]
del self.controller