Skip to content
This repository was archived by the owner on Jul 22, 2022. It is now read-only.

Commit 36d832a

Browse files
committed
Test
1 parent 9b6bfda commit 36d832a

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ before_install:
1515
- pip install -U pip
1616
- pip install -U setuptools wheel
1717
install:
18-
- pip install -Ur requirements.txt
18+
- make pip
1919
- pip install -U flake8 pylint pytest-cov codecov
2020
- docker pull gcc:4.8 # For gcc & g++
2121
- docker pull gcc:4.9 # For gccgo
@@ -26,6 +26,7 @@ install:
2626
- docker pull openjdk # For javac and java
2727
- docker pull clangbuiltlinux/ubuntu:llvm10-latest # For clang-10 & clang++-10
2828
- docker pull clangbuiltlinux/ubuntu:llvm11-latest # For clang-11 & clang++-11
29+
- docker pull bash # For bash
2930
script:
3031
- make lint
3132
- make pytest

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pytest:
4040
lint: flake8 pylint
4141

4242
flake8:
43-
flake8 dockerjudge
43+
flake8 dockerjudge test_*.py *_test.py
4444

4545
pylint:
46-
pylint dockerjudge
46+
pylint dockerjudge test_*.py *_test.py

test_.py renamed to test_dockerjudge.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
'Test dockerjudge'
2+
# pylint: disable = C0103, C0115, C0116
3+
14
from time import time
25
import unittest
36

@@ -143,7 +146,8 @@ def compiling_callback(code, stderr):
143146
self.assertFalse(code)
144147
self.assertFalse(stderr)
145148

146-
def judging_callback(id, status, stderr, duration):
149+
def judging_callback(id, status, # pylint: disable = W0622
150+
stderr, duration): # pylint: disable = W0613
147151
statuses = [Status.AC, Status.WA, Status.RE]
148152
self.assertEqual(status, statuses[id])
149153

@@ -212,7 +216,6 @@ def test_llvm_clang_10(self):
212216
self.assertTrue(result[0][2][1][1])
213217
self.assertFalse(result[1])
214218

215-
216219
def test_llvm_clang_11(self):
217220
result = judge(
218221
Clang('c', 11),

0 commit comments

Comments
 (0)