Skip to content

Commit

Permalink
Make D.py enterprise ready
Browse files Browse the repository at this point in the history
  • Loading branch information
tlkh authored Oct 2, 2019
1 parent 72b3bef commit 948e6d2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
10 changes: 8 additions & 2 deletions D.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
def big_D():
return "D"
import lib_d


def big_D(verbose=False):
d = lib_d.D()
if verbose:
print("Created D:", d.get_time_created)
return d.return_D()


def DDDDDDDDDD():
Expand Down
27 changes: 27 additions & 0 deletions lib_d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import time
import unittest


class D(object):
def __init__(self, name="D"):
self.name = name
self.time_created = time.time()

def print_D(self):
print(self.return_D())
return True

def return_D(self):
return("D")

def get_time_created(self):
return self.time_created


class TestD(unittest.TestCase):
def test_return_D(self):
self.assertEqual(D().return_D(), "D")


if __name__ == '__main__':
unittest.main()

0 comments on commit 948e6d2

Please sign in to comment.