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

Commit

Permalink
Merge pull request #11 from wangxinhe2006/dev
Browse files Browse the repository at this point in the history
Bump version number to v0.6.1
  • Loading branch information
wxh06 authored Dec 2, 2019
2 parents 7b4ae2f + e3d561c commit 92ee37d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<p align="center">
<a href="https://github.com/piterator-org"><img src="https://static.piterator.com/logo.png" alt="Piterator" width="20%"></a>
</p>

# dockerjudge
[![Build Status](https://www.travis-ci.org/wangxinhe2006/dockerjudge.svg)](https://www.travis-ci.org/wangxinhe2006/dockerjudge)
[![CodeCov](https://codecov.io/gh/wangxinhe2006/dockerjudge/graph/badge.svg)](https://codecov.io/gh/wangxinhe2006/dockerjudge)
Expand All @@ -10,6 +14,5 @@
A Docker Based Online Judge Engine

# [License](LICENSE)
Licensed under [the GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0.html)

[![agplv3-155x51.png](https://www.gnu.org/graphics/agplv3-155x51.png)](https://www.gnu.org/graphics/agplv3-155x51.png)
Licensed under [the Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
<a href="https://commons.wikimedia.org/wiki/File:Apache_Software_Foundation_Logo_(2016).svg"><img src="https://upload.wikimedia.org/wikipedia/commons/d/db/Apache_Software_Foundation_Logo_(2016).svg" alt="Apache Software Foundation Logo (2016).svg" width="10%" align="right"></a>
4 changes: 2 additions & 2 deletions dockerjudge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import docker
import ruamel.yaml

__version__ = '0.6'
__version__ = '0.6.1'


class Thread(threading.Thread):
Expand Down Expand Up @@ -62,7 +62,7 @@ def _judge(dir, container, commands, stdio, timeout, iofn):
'cat {}/{}'.format(dir, iofn[1])],
demux=True)
if cat.exit_code:
return ('OFNF', duration) # Output File Not Found
return ('ONF', duration) # Output Not Found
output = cat.output[0]
else:
output = result.output[0]
Expand Down
8 changes: 4 additions & 4 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_after_judge(self):
[('1 1', '1')],
1,
(None, 'a.out'))
self.assertEqual(result[0][0][0], 'OFNF')
self.assertEqual(result[0][0][0], 'ONF')
self.assertFalse(result[1])

def test_io(self):
Expand All @@ -119,7 +119,7 @@ def test_io(self):
self.assertEqual(result[0][2][0], 'RE')
self.assertFalse(result[1])

def test_ofnf(self):
def test_onf(self):
result = judge({'image': 'gcc:4.8',
'source': 'a.c',
'compile': 'gcc a.c',
Expand All @@ -136,8 +136,8 @@ def test_ofnf(self):
('1 0', '')],
1,
(None, 'a.out'))
self.assertEqual(result[0][0][0], 'OFNF')
self.assertEqual(result[0][1][0], 'OFNF')
self.assertEqual(result[0][0][0], 'ONF')
self.assertEqual(result[0][1][0], 'ONF')
self.assertEqual(result[0][2][0], 'RE')
self.assertFalse(result[1])

Expand Down

0 comments on commit 92ee37d

Please sign in to comment.