diff options
Diffstat (limited to 'ExampleSubmission')
| -rw-r--r-- | ExampleSubmission/example.py | 14 | ||||
| -rw-r--r-- | ExampleSubmission/test_dont_test_me.py | 7 | 
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 | 
