From 14f6cc39ecb9f30b89665a3bd153dd5a44709a8b Mon Sep 17 00:00:00 2001 From: Zonkil Date: Thu, 14 Mar 2024 19:56:08 +0100 Subject: [PATCH] fixed tests --- sio/workers/test/sources/chk-fraction.c | 2 +- sio/workers/test/test_executors.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sio/workers/test/sources/chk-fraction.c b/sio/workers/test/sources/chk-fraction.c index ad5e3ac..f8bcf12 100644 --- a/sio/workers/test/sources/chk-fraction.c +++ b/sio/workers/test/sources/chk-fraction.c @@ -9,7 +9,7 @@ int main(int argc, char **argv) { fscanf(fdh, "%s", buf); fscanf(fdo, "%s", buf2); if (strcmp(buf, buf2) == 0) - puts("OK\nOK\n84 2"); + puts("OK\nOK\n84/2"); else puts("WRONG"); return 0; diff --git a/sio/workers/test/test_executors.py b/sio/workers/test/test_executors.py index c79c7d0..e0df4cd 100644 --- a/sio/workers/test/test_executors.py +++ b/sio/workers/test/test_executors.py @@ -844,6 +844,7 @@ def test_checker_percentage_parsing(): eq_(output_to_fraction('007'), (7, 1)) eq_(output_to_fraction('007/0042'), (1, 6)) eq_(output_to_fraction('1e5'), (100000, 1)) + eq_(output_to_fraction(''), (100, 1)) with pytest.raises(CheckerError): output_to_fraction('42 2') @@ -855,8 +856,7 @@ def test_checker_percentage_parsing(): output_to_fraction('42/2/1') with pytest.raises(CheckerError): output_to_fraction('42/2.1') - with pytest.raises(CheckerError): - output_to_fraction('') + with pytest.raises(CheckerError): output_to_fraction('42/') with pytest.raises(CheckerError):