Package: competest
competesterA python cli tool to test competitive programming solutions(code) against multiple test cases and measure execution time.This tool comes handy when the programmer is dealing with a problem having
larger amount of test cases.INSTALLATIONDESCRIPTION & USAGETEST CASES FORMATOPTIONSCOMPILATIONBUILD INSTRUCTIONSTODOINSTALLATIONInstall usingpipLinux (use pip if default version of python is 3.x on your distro):sudo pip3 install --user --upgrade competestWindows:Run Powershell/cmd as admin and type:pip install competestAlternatively, Windows users can download the latest competest.exe file fromreleases.DESCRIPTION & USAGEcompetest is a command line program to test competitive coding problems for test cases. It requires python 3.6+ to be installed. It is licensed under GPL-v3 License.As of now, supported Languages are:CC++javapythonpypyexe(i.e. compiled executables)Usage:competest [OPTIONS] [python|java|pypy|exe] PROGRAM_FILEExample:competest python program1.py -t tests.jsonIf the test case file has the same name as the program file,-toption can be omitted.competestwill then look for ajsonor atxtfile with the same name as the program file in the same folder as the program file. If test case file is not found, it will thow an Errorcompetest python program1.pyTEST CASES FORMATThe test case file should contain all the test cases that you want to test your
code against.Note: The test case format is decided based on the file extension so the file
extension must be.txtor.json.Test Cases can be written in 2 formats:1. Test cases can be in .txt formatSingle Test Case:5
3 2 4 5 6

2
12Note: input is followed by output and separated by a blank line.Multiple Test Cases:5
3 2 4 5 6

2
12

7
3 2 4 5 6 10 16

10Note: Each test case is also separated by a blank line.2. Test cases can also be in json formatSingle Test Case:[
    {
        "input":[
            "5",
            "3 2 4 5 6"
        ],
        "output":[
            "2",
            "1 2"
        ]
    }
]Note:inputandoutputare arrays of strings where each string is a line of input/outputMultiple Test Cases:[
    {
        "input":[
            "5",
            "3 2 4 5 6"
        ],
        "output":[
            "2",
            "1 2"
        ]
    },
    {
        "input":[
            "7",
            "3 2 4 5 6 10 16"
        ],
        "output":["10"]
    }
]Find more about JSONOPTIONS-t, --test-cases FILENAME          File containing test cases.

 -a, --compiler-args ARGUMENTS      command line arguments to be passed to
                                    compiler(for compiled languages only)

 -h, --help                         Show this message and exit.COMPILATIONYou can pass extra arguments and flags to the compiler using-aoption.
Don't pass-oflag to C/C++ compiler as it is not required and handled
by the tool itself.The default compilation commands are:Javajavac classname.javaCgcc -O2 -lm filename.cC++g++ -O2 -lm filename.cppBUILD INSTRUCTIONSTo run competest directly usepython3 run.pyTo run the tests usepython3 run_tests.pyTo build competest binary (installpyinstallerfirst)pyinstaller -F run.pyThe executable will be saved indistfolder.TODOAdd a simpler test case formatImprove DocumentationAdd more metadata to setup.pyAdd more language supportMade with ♥️ byShailesh Aanand