Skip to content

Commit

Permalink
Adding initial testing
Browse files Browse the repository at this point in the history
  • Loading branch information
slightlynybbled committed May 4, 2018
1 parent 8884d05 commit 85ce29c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
xlrd >= 1.0.0
xlwt >= 1.0.0
xlwt >= 1.0.0
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
setup_requirements = [
'flake8 >= 3.5.0',
'stringify >= 0.1.1',
'sphinx >= 1.6'
'sphinx >= 1.6',
'pytest >= 3.5'
]

# provide correct path for version
Expand Down
36 changes: 36 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import tkinter as tk

import pytest

from tk_tools import *


@pytest.fixture
def create_root():
root = tk.Tk()
yield root


def test_init(create_root):
"""
Ensures that all elements of the GUI may be instantiated
without errors.
"""
RotaryScale(create_root)
Gauge(create_root)
Graph(create_root, 0, 10, 0, 10, 0.1, 0.1)
Led(create_root)
EntryGrid(create_root, 3)
LabelGrid(create_root, 3)
ButtonGrid(create_root, 3)
KeyValueEntry(create_root, keys=['1', '2'])
SmartOptionMenu(create_root, ['1', '2'])
SmartSpinBox(create_root)
SmartCheckbutton(create_root)
Calendar(create_root)
MultiSlotFrame(create_root)
SevenSegmentDigits(create_root)
BinaryLabel(create_root)
ToolTip(BinaryLabel(create_root), 'some text')

assert True

0 comments on commit 85ce29c

Please sign in to comment.