Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Migrate tests to pytest
  • Loading branch information
bittner committed Oct 4, 2018
1 parent 7112dec commit a919b5e
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,6 +6,7 @@ __pycache__/
*.wpu

# testing artifacts
/.pytest_cache/
/.tox/
/tests/reports/

Expand Down
57 changes: 57 additions & 0 deletions tests/unit/test_import.py
@@ -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
4 changes: 2 additions & 2 deletions tox.ini
Expand Up @@ -15,10 +15,10 @@ envlist =
py37

[testenv]
deps = behave
deps = pytest
commands =
pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython
behave
pytest

[testenv:flake8]
basepython = python3.6
Expand Down

0 comments on commit a919b5e

Please sign in to comment.