import os
import sys
import argparse
import logging
import datetime
from src.application.Logger import Logger

from src.application.ValidationController import ValidationController
from src.application.TestController import TestController


def main(argv):
    logger = Logger()
    parser = argparse.ArgumentParser()
    parser.add_argument("-i", "--input", help="Start with a Testfile", nargs=1)
    parser.add_argument("-v", "--validate", help="Validates Testfile", nargs=1, )

    args = parser.parse_args()
    if args.input:
        validator = ValidationController(os.getcwd() + "/" + args.input[0])
        if validator.logic():
            tester = TestController(os.getcwd() + "/" + args.input[0])
            tester.logic()
    elif args.validate:
        validator = ValidationController(os.getcwd() + "/" + args.validate[0])
        validator.logic()


if __name__ == "__main__":
        main(sys.argv[1:])

import os
import sys
import argparse
import logging
import datetime
import colorama
from src.application.Logger import Logger
from src.application.ValidationController import ValidationController
from src.application.TestController import TestController


def main(argv):
    colorama.init()
    
    logger = Logger()
    parser = argparse.ArgumentParser()
    parser.add_argument("-i", "--input", help="Start with a Testfile", nargs=1)
    parser.add_argument("-v", "--validate", help="Validates Testfile", nargs=1, )
    
    args = parser.parse_args()
    if args.input:
        validator = ValidationController(os.getcwd() + "/" + args.input[0])
        if validator.logic():
            tester = TestController(os.getcwd() + "/" + args.input[0])
            tester.logic()
    elif args.validate:
        validator = ValidationController(os.getcwd() + "/" + args.validate[0])
        validator.logic()


if __name__ == "__main__":
        main(sys.argv[1:])

Add colorama for coloring on windows
Add colorama for coloring on windows

Add the module colorama that makes ANSI escape character sequences work under MS Windows. The coloring is used to give a better overview about the testresults

  import os
  import sys
  import argparse
  import logging
  import datetime
+ import colorama
  from src.application.Logger import Logger
- 
  from src.application.ValidationController import ValidationController
  from src.application.TestController import TestController
  
  
  def main(argv):
+     colorama.init()
+     
      logger = Logger()
      parser = argparse.ArgumentParser()
      parser.add_argument("-i", "--input", help="Start with a Testfile", nargs=1)
      parser.add_argument("-v", "--validate", help="Validates Testfile", nargs=1, )
- 
+     
      args = parser.parse_args()
      if args.input:
          validator = ValidationController(os.getcwd() + "/" + args.input[0])
          if validator.logic():
              tester = TestController(os.getcwd() + "/" + args.input[0])
              tester.logic()
      elif args.validate:
          validator = ValidationController(os.getcwd() + "/" + args.validate[0])
          validator.logic()
  
  
  if __name__ == "__main__":
          main(sys.argv[1:])
  
Add colorama for coloring on windows
## Code Before:
import os
import sys
import argparse
import logging
import datetime
from src.application.Logger import Logger

from src.application.ValidationController import ValidationController
from src.application.TestController import TestController


def main(argv):
    logger = Logger()
    parser = argparse.ArgumentParser()
    parser.add_argument("-i", "--input", help="Start with a Testfile", nargs=1)
    parser.add_argument("-v", "--validate", help="Validates Testfile", nargs=1, )

    args = parser.parse_args()
    if args.input:
        validator = ValidationController(os.getcwd() + "/" + args.input[0])
        if validator.logic():
            tester = TestController(os.getcwd() + "/" + args.input[0])
            tester.logic()
    elif args.validate:
        validator = ValidationController(os.getcwd() + "/" + args.validate[0])
        validator.logic()


if __name__ == "__main__":
        main(sys.argv[1:])

## Instruction:
Add colorama for coloring on windows
## Code After:
import os
import sys
import argparse
import logging
import datetime
import colorama
from src.application.Logger import Logger
from src.application.ValidationController import ValidationController
from src.application.TestController import TestController


def main(argv):
    colorama.init()
    
    logger = Logger()
    parser = argparse.ArgumentParser()
    parser.add_argument("-i", "--input", help="Start with a Testfile", nargs=1)
    parser.add_argument("-v", "--validate", help="Validates Testfile", nargs=1, )
    
    args = parser.parse_args()
    if args.input:
        validator = ValidationController(os.getcwd() + "/" + args.input[0])
        if validator.logic():
            tester = TestController(os.getcwd() + "/" + args.input[0])
            tester.logic()
    elif args.validate:
        validator = ValidationController(os.getcwd() + "/" + args.validate[0])
        validator.logic()


if __name__ == "__main__":
        main(sys.argv[1:])
