Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi-file python test on Github Actions #101

Open
MartinXPN opened this issue May 16, 2024 · 0 comments
Open

Fix multi-file python test on Github Actions #101

MartinXPN opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed priority/low

Comments

@MartinXPN
Copy link
Owner

For some reason, the multi-file Python test case fails on the GitHub Actions machine. Yet it works fine locally and on Github Codespaces.
Below are the logs:

__________________________ TestMultiFile.test_python ___________________________
self = <tests.integration.coderunners.test_multi_file.TestMultiFile object at 0x7fcff033fad0>
    def test_python(self):
>       self.run_test(SubmissionRequest(test_cases=self.test_cases, language='python', code={
            'main.py': 'from dir.code import one\n\nprint(one() + one())',
            'ones.py': 'def ret_one():\n    return 1',
            'dir': {
                'code.py': 'from ones import ret_one\n\ndef one():\n    return ret_one()'
            }
        }))
tests/integration/coderunners/test_multi_file.py:20: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
request = SubmissionRequest(code={'main.py': 'from dir.code import one\n\nprint(one() + one())', 'ones.py': 'def ret_one():\n   ...loat_precision=1e-05, delimiter=None, checker_code=None, checker_language=None, callback_url=None, encryption_key=None)
    @staticmethod
    def run_test(request: SubmissionRequest) -> SubmissionResult:
        res = CodeRunner.from_language(language=request.language).invoke(lambda_client, request=request)
        print(res)
>       assert res.overall.status == Status.OK
E       AssertionError: assert <Status.RUNTIME_ERROR: 'Runtime error'> == <Status.OK: 'Solved'>
E        +  where <Status.RUNTIME_ERROR: 'Runtime error'> = RunResult(status=<Status.RUNTIME_ERROR: 'Runtime error'>, memory=8.875, time=0.023763179779052734, return_code=1, score=0.0, message=None, outputs=None, errors=None, output_files=None, output_assets=None).status
E        +    where RunResult(status=<Status.RUNTIME_ERROR: 'Runtime error'>, memory=8.875, time=0.023763179779052734, return_code=1, score=0.0, message=None, outputs=None, errors=None, output_files=None, output_assets=None) = SubmissionResult(overall=RunResult(status=<Status.RUNTIME_ERROR: 'Runtime error'>, memory=8.875, time=0.02376317977905...9779052734, return_code=1, score=0.0, message=None, outputs=None, errors=None, output_files=None, output_assets=None)]).overall
E        +  and   <Status.OK: 'Solved'> = Status.OK
tests/integration/coderunners/test_multi_file.py:15: AssertionError
----------------------------- Captured stdout call -----------------------------
invocation result: {"overall": {"status": "Runtime error", "memory": 8.875, "time": 0.023763179779052734, "returnCode": 1, "score": 0.0, "message": null, "outputs": null, "errors": null, "outputFiles": null, "outputAssets": null}, "compileResult": {"status": "Solved", "memory": 10.0, "time": 0.0[43](https://github.com/MartinXPN/LambdaJudge/actions/runs/9114831228/job/25059711987#step:9:44)369293212890625, "returnCode": 0, "score": 0, "message": null, "outputs": "", "errors": "", "outputFiles": null, "outputAssets": null}, "lintingResult": null, "testResults": [{"status": "Runtime error", "memory": 8.875, "time": 0.023763179779052734, "returnCode": 1, "score": 0.0, "message": null, "outputs": null, "errors": null, "outputFiles": null, "outputAssets": null}]}
SubmissionResult(overall=RunResult(status=<Status.RUNTIME_ERROR: 'Runtime error'>, memory=8.875, time=0.023763179779052734, return_code=1, score=0.0, message=None, outputs=None, errors=None, output_files=None, output_assets=None), compile_result=RunResult(status=<Status.OK: 'Solved'>, memory=10.0, time=0.043369293212890625, return_code=0, score=0.0, message=None, outputs='', errors='', output_files=None, output_assets=None), linting_result=None, test_results=[RunResult(status=<Status.RUNTIME_ERROR: 'Runtime error'>, memory=8.875, time=0.0237631797790[52](https://github.com/MartinXPN/LambdaJudge/actions/runs/9114831228/job/25059711987#step:9:53)734, return_code=1, score=0.0, message=None, outputs=None, errors=None, output_files=None, output_assets=None)])
=========================== short test summary info ============================
FAILED tests/integration/coderunners/test_multi_file.py::TestMultiFile::test_python - AssertionError: assert <Status.RUNTIME_ERROR: 'Runtime error'> == <Status.OK: 'Solved'>
 +  where <Status.RUNTIME_ERROR: 'Runtime error'> = RunResult(status=<Status.RUNTIME_ERROR: 'Runtime error'>, memory=8.875, time=0.023763179779052734, return_code=1, score=0.0, message=None, outputs=None, errors=None, output_files=None, output_assets=None).status
 +    where RunResult(status=<Status.RUNTIME_ERROR: 'Runtime error'>, memory=8.875, time=0.023763179779052734, return_code=1, score=0.0, message=None, outputs=None, errors=None, output_files=None, output_assets=None) = SubmissionResult(overall=RunResult(status=<Status.RUNTIME_ERROR: 'Runtime error'>, memory=8.875, time=0.02376317977905...9779052734, return_code=1, score=0.0, message=None, outputs=None, errors=None, output_files=None, output_assets=None)]).overall
 +  and   <Status.OK: 'Solved'> = Status.OK
============= 1 failed, [56](https://github.com/MartinXPN/LambdaJudge/actions/runs/9114831228/job/25059711987#step:9:57) passed, 1 skipped in 112.07s (0:01:52) ==============
Error: Process completed with exit code 1.
@MartinXPN MartinXPN added bug Something isn't working priority/low help wanted Extra attention is needed good first issue Good for newcomers labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed priority/low
Projects
Status: Todo
Development

No branches or pull requests

1 participant