I had wanted to put the release process (starting in the referenced line) in a separate class method, say simulate_release, to make it easier to test separately. But if I set up a new class here, I didn’t know how to access the updated value of the self.current_incarceration_status from the previous simulate_incarceration class, so it could be used to update attributes relevant to the release process.
Two questions:
How would I access the updated self.current_incarceration_status from the simulate_incarceration method in the simulate_release method?
Would separating out the simulate_incarceration and simulate_release methods not be the recommended design choice? (I think separating the two might make testing easier?)
https://github.com/khanna7/cadre/blob/9d1f5d42ec1581b7009bd7f72e8f71a2249cd089/python/pycadre/cadre_person.py#L85
I had wanted to put the release process (starting in the referenced line) in a separate class method, say
simulate_release
, to make it easier to test separately. But if I set up a new class here, I didn’t know how to access the updated value of theself.current_incarceration_status
from the previoussimulate_incarceration
class, so it could be used to update attributes relevant to the release process.Two questions:
self.current_incarceration_status
from thesimulate_incarceration
method in thesimulate_release
method?simulate_incarceration
andsimulate_release
methods not be the recommended design choice? (I think separating the two might make testing easier?)