Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Migrate tests to pytest
- Loading branch information
Showing
3 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ __pycache__/ | |
*.wpu | ||
|
||
# testing artifacts | ||
/.pytest_cache/ | ||
/.tox/ | ||
/tests/reports/ | ||
|
||
|
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,57 @@ | ||
""" | ||
Tests for application. | ||
""" | ||
|
||
|
||
def test_import_turtle(): | ||
""" | ||
Try to import PythonTurtle module and perform some stupid verifications. | ||
""" | ||
import pythonturtle | ||
assert pythonturtle.__version__ is not None | ||
|
||
from pythonturtle import application | ||
assert application is not None | ||
|
||
from pythonturtle import helppages | ||
assert helppages is not None | ||
|
||
from pythonturtle import my_turtle | ||
assert my_turtle is not None | ||
|
||
from pythonturtle import turtleprocess | ||
assert turtleprocess is not None | ||
|
||
from pythonturtle import turtlewidget | ||
assert turtlewidget is not None | ||
|
||
|
||
def test_import_misc(): | ||
""" | ||
Try to import the misc submodule and perform some stupid verifications. | ||
""" | ||
from pythonturtle.misc import helpers | ||
assert helpers is not None | ||
|
||
from pythonturtle.misc import smartsleep | ||
assert smartsleep is not None | ||
|
||
from pythonturtle.misc import vector | ||
assert vector is not None | ||
|
||
|
||
def test_import_shelltoprocess(): | ||
""" | ||
Try to import the misc submodule and perform some stupid verifications. | ||
""" | ||
from pythonturtle import shelltoprocess | ||
assert shelltoprocess is not None | ||
|
||
from pythonturtle.shelltoprocess import console | ||
assert console is not None | ||
|
||
from pythonturtle.shelltoprocess import forkedpyshell | ||
assert forkedpyshell is not None | ||
|
||
from pythonturtle.shelltoprocess import shell | ||
assert shell is not None |
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