summaryrefslogtreecommitdiffstats
path: root/ExampleSubmission
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-01-19 17:05:53 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2022-01-19 17:05:53 +0000
commit0404c5d319d0cf85941b20e53a7dab1e9bf71bef (patch)
tree7ca3384756c34826f41c7624064b952a98023f83 /ExampleSubmission
parenteb5b1d2889aa5e408309f5d89989768ff19bc7f4 (diff)
downloadSmarker-0404c5d319d0cf85941b20e53a7dab1e9bf71bef.tar.gz
Smarker-0404c5d319d0cf85941b20e53a7dab1e9bf71bef.zip
added testing and generating testing reports
Diffstat (limited to 'ExampleSubmission')
-rw-r--r--ExampleSubmission/example.py14
-rw-r--r--ExampleSubmission/test_dont_test_me.py7
2 files changed, 21 insertions, 0 deletions
diff --git a/ExampleSubmission/example.py b/ExampleSubmission/example.py
index a226adb..cc61122 100644
--- a/ExampleSubmission/example.py
+++ b/ExampleSubmission/example.py
@@ -2,6 +2,7 @@
# 12-01-21
import tkinter as tk
+from dataclasses import dataclass
class Application(tk.Tk):
"""An example class, which implements a GUI by inheriting from tkinter.Tk
@@ -35,6 +36,19 @@ class Application(tk.Tk):
"""
return num1 + num2
+@dataclass
+class MyDate:
+ year:int
+ month:int
+ day:int
+
+ def __eq__(self, otherDate):
+ return self.year == otherDate.year and self.month == otherDate.month and self.day == otherDate.day
+
+ def __str__(self):
+ "%d-%d-%4d" % (self.day, self.month, self.year)
+
+
# hello world!
def hello_world(times):
"""Prints 'hello world!' to stdout. Prints it out `times` times.
diff --git a/ExampleSubmission/test_dont_test_me.py b/ExampleSubmission/test_dont_test_me.py
new file mode 100644
index 0000000..511c713
--- /dev/null
+++ b/ExampleSubmission/test_dont_test_me.py
@@ -0,0 +1,7 @@
+"""My default pytest will assume that all files prefixed with
+'test' are test files. This file is here to make sure that
+pytest only runs on the files it should run on.
+"""
+
+def test_1():
+ assert 1 == 2 \ No newline at end of file