-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Move ipython magic tests to main unit test suite
The `.github/system_tests/test_ipython_magics.py` file provided tests for the ipython magics, however, these can simply be run in the main test suite invoked directly through `pytest`.
- Loading branch information
Showing
3 changed files
with
24 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Tests for :mod:`aiida.tools.ipython.ipython_magics`.""" | ||
import textwrap | ||
|
||
from IPython.testing.globalipapp import get_ipython | ||
|
||
from aiida.tools.ipython.ipython_magics import register_ipython_extension | ||
|
||
|
||
def test_ipython_magics(): | ||
"""Test that the ``%aiida`` magic can be loaded and imports the ``QueryBuilder`` and ``Node`` classes.""" | ||
ipy = get_ipython() | ||
register_ipython_extension(ipy) | ||
cell = textwrap.dedent( | ||
""" | ||
%aiida | ||
qb=QueryBuilder() | ||
qb.append(Node) | ||
qb.all() | ||
Dict().store() | ||
""" | ||
) | ||
result = ipy.run_cell(cell) | ||
assert result.success |