basically working
This commit is contained in:
42
tests.py
Normal file
42
tests.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import unittest
|
||||
import shutil
|
||||
|
||||
import converter
|
||||
|
||||
class TestDiary(unittest.TestCase):
|
||||
|
||||
# BASE_FODLER = "test_data"
|
||||
|
||||
def test_create_month_file_january(self):
|
||||
# python command_line 2021-01
|
||||
BASE_FODLER = "test_data"
|
||||
converter.write_markdown_file('quiz-example.csv')
|
||||
# assert file was created
|
||||
assert(os.path.exists(os.path.join(BASE_FODLER, "slide-deck.md")))
|
||||
|
||||
# def test_create_month_file_january(self):
|
||||
# # python command_line 2021-01
|
||||
# BASE_FODLER = "test_data"
|
||||
# diary.parse_input('2021-01', BASE_FODLER)
|
||||
# # assert file was created
|
||||
# assert(os.path.exists(os.path.join(BASE_FODLER, "01_2021.md")))
|
||||
|
||||
|
||||
# def setUp(self):
|
||||
# print("test started...")
|
||||
# BASE_FODLER = "test_data"
|
||||
# # bla = os.path.join(BASE_FODLER, "12_2020.md")
|
||||
# if not os.path.exists(BASE_FODLER):
|
||||
# os.makedirs(BASE_FODLER)
|
||||
|
||||
# def tearDown(self):
|
||||
# # pass
|
||||
# BASE_FODLER = "test_data"
|
||||
# if os.path.exists(BASE_FODLER):
|
||||
# shutil.rmtree(BASE_FODLER) # remove testing garbage folder
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user