New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove outdated backwards compat code #9187
Conversation
I need to figure out why tests are currently failing |
@m-vdb Feel free to request review from me then 👍🏻 (instead of the entire squad) |
@wochinge after some search I think I understand why the tests are currently failing, but I don't know how to fix this yet. Maybe you have an idea. The different event instances should have a These tests are failing, and at line 149 we deserialise events through a helper from conftest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re the failing tests:
- The old pickled dialogue files don't have the
metadata
property - Jsonpickle reloads the pickled dialogue without using the constructor (e.g. here, "When a class instance is unpickled, its init() method is usually not invoked.")
- There is no attribute
metadata
as we have never assigned this attribute in the first place
As far as I can see from the events
and tracker_store
modules we are never restoring a tracker using pickle
or jsonpickle
which in turn means that the jsonpickling is no functionality which we need to test. You could
- re-dump the tracker states via
json.dumps(dialogue.as_dict())
and then usejson.loads
to the load the tracker and execute the (actual) test. - drop the persisted dialogues and inline them as list of events in the code. This way they are closer to the test code and we don't use code to serialize / deserialize trackers which we don't use anywhere else (I think I prefer this one)
f6c1026
to
210d88c
Compare
210d88c
to
12262cd
Compare
Fixes #6487
Proposed changes:
Status (please check what you already did):
black
(please check Readme for instructions)