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

运行tests/Python_and_core/test.py报错Failed #82

Open
Ignareo opened this issue Feb 25, 2025 · 0 comments
Open

运行tests/Python_and_core/test.py报错Failed #82

Ignareo opened this issue Feb 25, 2025 · 0 comments

Comments

@Ignareo
Copy link

Ignareo commented Feb 25, 2025

(Judger) root@Laptop:~/QingdaoU/Judger# python3 tests/Python_and_core/test.py
Judger version 2.1.1
3.10.16 (main, Jan 14 2025, 22:49:19) [Clang 19.1.6 ]
Running test_args
.Running test_args_item_must_be_string
/root/QingdaoU/Judger/tests/Python_and_core/testcase/integration/test.py:41: DeprecationWarning: Please use assertRaisesRegex instead.
  with self.assertRaisesRegexp(ValueError, "args item must be a string"):
.Running test_args_must_be_list
.Running test_child_proc_cpu_time_limit
.Running test_child_proc_real_time_limit
.Running test_cpp_meta
FRunning test_cpu_time
.Running test_env
.Running test_env_item_must_be_string
.Running test_env_must_be_list
.Running test_gcc_random
FRunning test_get_time
FRunning test_memory1
.Running test_memory2
.Running test_memory3
.Running test_memory4
.Running test_memory_limit_check_only
.Running test_normal
.Running test_output_size
.Running test_re1
.Running test_re2
.Running test_real_time
.Running test_seccomp_rule_can_be_none
.Running test_stack_size
.Running test_stdout_and_stderr
.Running test_uid_and_gid
.Running test_writev
.Running test_exceveat
.Running test_execve
.Running test_fork
.Running test_read_write_file_using_open
.Running test_read_write_file_using_openat
.Running test_sysinfo
.Running test_write_file_using_open
.Running test_write_file_using_openat
.
======================================================================
FAIL: test_cpp_meta (testcase.integration.test.IntegrationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/QingdaoU/Judger/tests/Python_and_core/testcase/integration/test.py", line 294, in test_cpp_meta
    self.assertEqual(result["result"], _judger.RESULT_CPU_TIME_LIMIT_EXCEEDED)
AssertionError: 4 != 1

======================================================================
FAIL: test_gcc_random (testcase.integration.test.IntegrationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/QingdaoU/Judger/tests/Python_and_core/testcase/integration/test.py", line 285, in test_gcc_random
    self.assertTrue(result["real_time"] >= 2000)
AssertionError: False is not true

======================================================================
FAIL: test_get_time (testcase.integration.test.IntegrationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/QingdaoU/Judger/tests/Python_and_core/testcase/integration/test.py", line 337, in test_get_time
    self.assertEqual(result["result"], _judger.RESULT_SUCCESS)
AssertionError: 4 != 0

----------------------------------------------------------------------
Ran 35 tests in 16.866s

FAILED (failures=3)
  • 环境是WSL2

  • 小白不太懂哪里出问题了⊙﹏⊙∥

  • 运行demo/demo.py正常

(QingdaoU_2) root@Laptop:~/QingdaoU_2/Judger/demo# python3 demo.py
{'cpu_time': 1, 'real_time': 3, 'memory': 1675264, 'signal': 0, 'exit_code': 0, 'error': 0, 'result': 0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant