Skip to content
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

Resolve aiida deprecation warning in the tests #111

Open
agoscinski opened this issue Jul 19, 2024 · 0 comments
Open

Resolve aiida deprecation warning in the tests #111

agoscinski opened this issue Jul 19, 2024 · 0 comments

Comments

@agoscinski
Copy link
Contributor

Running pytest I get the following warnings (tests pass)

../../.local/share/hatch/env/virtual/aiida-diff/UgDmwqUy/hatch-test.py3.10/lib/python3.10/site-packages/aiida/manage/tests/pytest_fixtures.py:54
  /home/alexgo/.local/share/hatch/env/virtual/aiida-diff/UgDmwqUy/hatch-test.py3.10/lib/python3.10/site-packages/aiida/manage/tests/pytest_fixtures.py:54: AiidaDeprecationWarning: The module `aiida.manage.tests.pytest_fixtures` is deprecated, please use `aiida.tools.pytest_fixtures` instead. (this will be removed in v3)
    warn_deprecation(

tests/test_calculations.py::test_process
tests/test_cli.py::TestDataCli::test_data_diff_list
tests/test_cli.py::TestDataCli::test_data_diff_export
  /home/alexgo/.local/share/hatch/env/virtual/aiida-diff/UgDmwqUy/hatch-test.py3.10/lib/python3.10/site-packages/aiida/manage/tests/pytest_fixtures.py:384: AiidaDeprecationWarning: the clear_database_after_test fixture is deprecated, use aiida_profile_clean instead (this will be removed in v3)
    warn_deprecation('the clear_database_after_test fixture is deprecated, use aiida_profile_clean instead', version=3)

tests/test_calculations.py::test_process
tests/test_calculations.py::test_process
tests/test_calculations.py::test_process
tests/test_calculations.py::test_process
  /home/alexgo/.local/share/hatch/env/virtual/aiida-diff/UgDmwqUy/hatch-test.py3.10/lib/python3.10/site-packages/aiida/storage/psql_dos/orm/utils.py:84: SAWarning: Object of type <DbNode> not in session, add operation along 'DbUser.dbnodes' will not proceed (This warning originated from the Session 'autoflush' process, which was invoked automatically in response to a user-initiated operation.)
    return getattr(self._model, item)

tests/test_calculations.py::test_process
  /home/alexgo/.local/share/hatch/env/virtual/aiida-diff/UgDmwqUy/hatch-test.py3.10/lib/python3.10/site-packages/aiida/storage/psql_dos/orm/querybuilder/main.py:182: SAWarning: Object of type <DbNode> not in session, add operation along 'DbUser.dbnodes' will not proceed (This warning originated from the Session 'autoflush' process, which was invoked automatically in response to a user-initiated operation.)
    result = build.query.count()

tests/test_calculations.py::test_process
  /home/alexgo/.local/share/hatch/env/virtual/aiida-diff/UgDmwqUy/hatch-test.py3.10/lib/python3.10/site-packages/aiida/storage/psql_dos/orm/nodes.py:224: SAWarning: Object of type <DbNode> not in session, add operation along 'DbComputer.dbnodes' will not proceed
    session.commit()

tests/test_calculations.py::test_process
  /home/alexgo/.local/share/hatch/env/virtual/aiida-diff/UgDmwqUy/hatch-test.py3.10/lib/python3.10/site-packages/aiida/storage/psql_dos/orm/utils.py:84: SAWarning: Object of type <DbNode> not in session, add operation along 'DbComputer.dbnodes' will not proceed (This warning originated from the Session 'autoflush' process, which was invoked automatically in response to a user-initiated operation.)
    return getattr(self._model, item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant