for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from msquaredc.project import Project
import unittest,os
def test_cleanup(func):
def call(*args,**kwargs):
try:
os.remove(func.__name__)
except (PermissionError,FileNotFoundError):
pass
res = func(*args, file=func.__name__,**kwargs)
finally:
except (PermissionError, FileNotFoundError):
return res
return call
class ProjectTest(unittest.TestCase):
@test_cleanup
def test_init(self,file):
p = Project(data="data sample for jerome.txt", questions="config.yml", coder="MGM", file=file)
def test_integration(self,file):
value = 0
for index,i in enumerate(p):
for j in i.coding_questions:
i[j] = value
value += 1
p.export()