Closed superstar54 closed 1 year ago
@sphuber I don't know why the ci/tests failed, because the new changes will not affect the core code. I also run the test locally, all of them passed.
hi @superstar54 , thanks for the fix!
the test failures are indeed weird - either some of the data it's comparing against is coming from somewhere else or the mechanism of comparison may be flaky (perhaps dependent on order of query result / ...)?
____________________________ test_user_get_entities ____________________________
data_regression = <pytest_regressions.data_regression.DataRegressionFixture object at 0x7f1bfc190a90>
def test_user_get_entities(data_regression):
"""Test ``User.get_entities``"""
orm.User(email="verdi@opera.net", first_name="Giuseppe", last_name="Verdi").store()
py_users = models.User.get_entities(order_by=["id"])
> data_regression.check([replace_dynamic(c.dict()) for c in py_users])
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-runner/pytest-0/test_user_get_entities0/test_models/test_user_get_entities.yml
E /tmp/pytest-of-runner/pytest-0/test_user_get_entities0/test_models/test_user_get_entities.obtained.yml
E HTML DIFF: /tmp/pytest-of-runner/pytest-0/test_user_get_entities0/test_models/test_user_get_entities.obtained.diff.html
E ---
E +++
E @@ -1,8 +1,8 @@
E -- email: tests@aiida.mail
E - first_name: AiiDA
E +- email: test@aiida.local
E + first_name: ''
E id: int
E - institution: aiidateam
E - last_name: Plugintest
E + institution: ''
E + last_name: ''
E - email: verdi@opera.net
E first_name: Giuseppe
E id: int
If it's urgent, we can merge it as-is; otherwise let's wait until @sphuber has time to have a look
Hi @ltalirz , thanks for looking into it. Not urgent, we can wait.
Thanks @superstar54 . I will have a look at the CI soon and fix it. Then we can merge this.
I run the scripts in the example folder. Two of them failed, and they need to be updated.
I got this error when committing new changes:
It's likely due the the
isort
package. I update its version to5.12.0
and there is no more error.