-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically add the unit test command to Quantum’s command environm…
…ent when the plugin is loaded.
- Loading branch information
Showing
4 changed files
with
37 additions
and
19 deletions.
There are no files selected for viewing
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" This module defines unit tests that can be run from within Quantum's | ||
interactive console. | ||
To run these tests from interactive console: | ||
>>> exec(open('plugins/PyCell/tests/test_all.py').read()) | ||
""" | ||
# import test_symengine_cell | ||
import test_sympy_cell | ||
import test_utility_cell | ||
import test_projection_cell | ||
import test_logic_cell | ||
import test_dataframe_cell | ||
from command import SingletonCommand | ||
import Quantum | ||
|
||
class TestPyCell(SingletonCommand): | ||
""" | ||
Run PyCell unit tests. | ||
""" | ||
def execute(self): | ||
test_dataframe_cell.run_test() | ||
|
||
@property | ||
def name(self): | ||
return "test_pycell" | ||
|
||
Q = Quantum.QuKernel() | ||
test_pycell = TestPyCell() | ||
Q.COMMANDS[test_pycell.name] = test_pycell.execute | ||
SingletonCommand().app.main.names.update(Q.COMMANDS) | ||
# test_symengine_cell.run_test() | ||
#test_sympy_cell.run_test() | ||
#test_utility_cell.run_test() | ||
#test_projection_cell.run_test() | ||
#test_logic_cell.run_test() | ||
#test_dataframe_cell.run_test() |
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