From 708c5927821af2cf37ac0766e9e64d9290279a09 Mon Sep 17 00:00:00 2001 From: Daniel Kenan Date: Tue, 12 Jul 2022 15:02:25 +0200 Subject: [PATCH] cache directory creation fixed --- LogT.py | 4 ++++ Logger.py | 3 +++ cache/logs.txt | 1 - cache/logstest.txt | 19 ------------------- 4 files changed, 7 insertions(+), 20 deletions(-) delete mode 100644 cache/logstest.txt diff --git a/LogT.py b/LogT.py index b6cf4cf..cc57f05 100644 --- a/LogT.py +++ b/LogT.py @@ -1,4 +1,8 @@ import sys +import os + +if not os.path.isdir('cache'): + os.makedirs('cache') class Logger(object): def __init__(self): diff --git a/Logger.py b/Logger.py index 80efc21..749462c 100644 --- a/Logger.py +++ b/Logger.py @@ -1,4 +1,7 @@ import sys +import os +if not os.path.isdir('cache'): + os.makedirs('cache') class Logger(object): def __init__(self): diff --git a/cache/logs.txt b/cache/logs.txt index 3105bf1..e69de29 100644 --- a/cache/logs.txt +++ b/cache/logs.txt @@ -1 +0,0 @@ -['Declarations', 'string name = "kenan"', 'num age', 'input name', 'input age'] diff --git a/cache/logstest.txt b/cache/logstest.txt deleted file mode 100644 index 3bd83ed..0000000 --- a/cache/logstest.txt +++ /dev/null @@ -1,19 +0,0 @@ - -RUNNING TEST CASE: helloworld -A simple hello world program :-) - -*************************** Case: 1 ************************** - - -THE EXPECTED SCREEN_OUTPUT SHOULD BE: -Hello, World - -PROGRAM GENERATED SCREEN_OUTPUT IS: -Hello, Worl - -❌ failed this case - ----------------------------- DONE ---------------------------- - - -From 1 scenario(s), you solved 0