improve testing
This commit is contained in:
parent
a5429f82d7
commit
3dd40edfb0
@ -60,16 +60,16 @@ test_config = """
|
|||||||
class ModuleTest(unittest.TestCase):
|
class ModuleTest(unittest.TestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def test_without_rendering():
|
def test_without_rendering():
|
||||||
# Create temporary json settings file with the config from above
|
# Check if settings.json file exists in current directory
|
||||||
with open('dummy.json', mode="w") as file:
|
if not os.path.exists("settings.json"):
|
||||||
file.write(test_config)
|
# Create temporary json settings file with the config from above
|
||||||
|
with open('settings.json', mode="w") as file:
|
||||||
|
file.write(test_config)
|
||||||
print('testing Inkycal in non-render-mode...', end="")
|
print('testing Inkycal in non-render-mode...', end="")
|
||||||
inky = Inkycal('dummy.json', render=False)
|
inky = Inkycal('settings.json', render=False)
|
||||||
inky.test()
|
inky.test()
|
||||||
print('OK')
|
print('OK')
|
||||||
|
|
||||||
os.remove('dummy.json')
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user