[0KRunning with gitlab-runner 11.6.0 (f100a208) [0;m[0K on universal-tn4 d3cf9985 [0;m[0KUsing Docker executor with image zesje/base ... [0;m[0KPulling docker image zesje/base ... [0;m[0KUsing docker image sha256:7bfae5ead574ab7a73f802dfb0b47fdbc5632492b8de9d4e5bdd6983e6d8f6cc for zesje/base ... [0;msection_start:1558970366:prepare_script [0KRunning on runner-d3cf9985-project-1089-concurrent-3 via tnw-tn4.tudelft.net... section_end:1558970370:prepare_script [0Ksection_start:1558970370:get_sources [0K[32;1mFetching changes...[0;m Removing .coverage Removing .pytest_cache/ Removing cov.html/ Removing cov.xml Removing data/scans/ Removing tests/__pycache__/ Removing tests/data/submissions/ Removing zesje/__pycache__/ Removing zesje/api/__pycache__/ Removing zesje/static/ HEAD is now at 728157b Merge branch 'QRCodes-odd-pages' into 'develop' From https://gitlab.kwant-project.org/works-on-my-machine/zesje 00b03ed..94c3229 approve_shortcut -> origin/approve_shortcut 582761a..d5e6712 feature/pre-grading -> origin/feature/pre-grading d2188e7..3f5198d fix/corner-tests -> origin/fix/corner-tests [32;1mChecking out d5e67127 as feature/pre-grading...[0;m [32;1mSkipping Git submodules setup[0;m section_end:1558970375:get_sources [0Ksection_start:1558970375:restore_cache [0Ksection_end:1558970379:restore_cache [0Ksection_start:1558970379:download_artifacts [0K[32;1mDownloading artifacts for build (61522)...[0;m Downloading artifacts from coordinator... ok [0;m id[0;m=61522 responseStatus[0;m=200 OK token[0;m=Kszu6uvC section_end:1558970381:download_artifacts [0Ksection_start:1558970381:build_script [0K[32;1m$ pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt[0;m Collecting git+https://github.com/mstamy2/PyPDF2 (from -r requirements.txt (line 29)) Cloning https://github.com/mstamy2/PyPDF2 to /tmp/pip-req-build-jspososv Requirement already satisfied (use --upgrade to upgrade): PyPDF2==1.26.0 from git+https://github.com/mstamy2/PyPDF2 in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 29)) Requirement already satisfied: flask in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 2)) (1.0.2) Requirement already satisfied: flask_restful in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 3)) (0.3.6) Collecting flask_sqlalchemy (from -r requirements.txt (line 4)) Downloading https://files.pythonhosted.org/packages/08/ca/582442cad71504a1514a2f053006c8bb128844133d6076a4df17117545fa/Flask_SQLAlchemy-2.4.0-py2.py3-none-any.whl Collecting sqlalchemy (from -r requirements.txt (line 5)) Downloading https://files.pythonhosted.org/packages/2b/b2/e6f5c5efc68942edefaa924e8fbea0b32375baa434a511cbf6bb17769cf6/SQLAlchemy-1.3.3.tar.gz (5.9MB) Collecting Flask-Migrate (from -r requirements.txt (line 6)) Downloading https://files.pythonhosted.org/packages/4b/22/d20a105f13c58fe590ef38ac59d5cabc1a917549ea8f90b0ca7b4e84f6be/Flask_Migrate-2.5.2-py2.py3-none-any.whl Collecting alembic (from -r requirements.txt (line 7)) Downloading https://files.pythonhosted.org/packages/6e/8b/fa3bd058cccd5e9177fea4efa26bfb769228fdd3178436ad5e05830ef6ef/alembic-1.0.10.tar.gz (1.0MB) Requirement already satisfied: pyyaml in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 8)) (3.12) Collecting celery (from -r requirements.txt (line 9)) Downloading https://files.pythonhosted.org/packages/5c/a1/a3dd9d8bfa09156ec2cba37f90accf35c0f4ecc3980d96cb4fb99e56504b/celery-4.3.0-py2.py3-none-any.whl (413kB) Collecting redis (from -r requirements.txt (line 10)) Downloading https://files.pythonhosted.org/packages/ac/a7/cff10cc5f1180834a3ed564d148fb4329c989cbb1f2e196fc9a10fa07072/redis-3.2.1-py2.py3-none-any.whl (65kB) Requirement already satisfied: numpy in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 13)) (1.14.5) Requirement already satisfied: scipy in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 14)) (1.1.0) Requirement already satisfied: matplotlib in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 17)) (2.2.2) Requirement already satisfied: seaborn in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 18)) (0.8.1) Requirement already satisfied: pdfrw in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 21)) (0.4) Requirement already satisfied: reportlab in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 22)) (3.4.0) Requirement already satisfied: Wand in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 23)) (0.4.4) Requirement already satisfied: Pillow in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 24)) (5.2.0) Requirement already satisfied: pyStrich in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 25)) (0.8) Requirement already satisfied: opencv-python in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 28)) (3.4.1.15) Requirement already satisfied: pylibdmtx in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 30)) (0.1.7) Requirement already satisfied: pandas in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 33)) (0.23.1) Requirement already satisfied: openpyxl in /usr/lib/python3.6/site-packages (from -r requirements.txt (line 34)) (2.5.4) Requirement already satisfied: pytest in /usr/lib/python3.6/site-packages (from -r requirements-dev.txt (line 2)) (3.6.3) Requirement already satisfied: pyssim in /usr/lib/python3.6/site-packages (from -r requirements-dev.txt (line 3)) (0.4) Collecting pytest-cov (from -r requirements-dev.txt (line 4)) Downloading https://files.pythonhosted.org/packages/84/7b/73f8522619d1cbb22b9a36f9c54bc5ce5e24648e53cc1bf566477d2d1f2b/pytest_cov-2.7.1-py2.py3-none-any.whl Requirement already satisfied: flake8 in /usr/lib/python3.6/site-packages (from -r requirements-dev.txt (line 7)) (3.5.0) Requirement already satisfied: itsdangerous>=0.24 in /usr/lib/python3.6/site-packages (from flask->-r requirements.txt (line 2)) (0.24) Requirement already satisfied: Werkzeug>=0.14 in /usr/lib/python3.6/site-packages (from flask->-r requirements.txt (line 2)) (0.14.1) Requirement already satisfied: Jinja2>=2.10 in /usr/lib/python3.6/site-packages (from flask->-r requirements.txt (line 2)) (2.10) Requirement already satisfied: click>=5.1 in /usr/lib/python3.6/site-packages (from flask->-r requirements.txt (line 2)) (6.7) Requirement already satisfied: pytz in /usr/lib/python3.6/site-packages (from flask_restful->-r requirements.txt (line 3)) (2018.5) Requirement already satisfied: aniso8601>=0.82 in /usr/lib/python3.6/site-packages (from flask_restful->-r requirements.txt (line 3)) (3.0.2) Requirement already satisfied: six>=1.3.0 in /usr/lib/python3.6/site-packages (from flask_restful->-r requirements.txt (line 3)) (1.11.0) Collecting Mako (from alembic->-r requirements.txt (line 7)) Downloading https://files.pythonhosted.org/packages/f9/93/63f78c552e4397549499169198698de23b559b52e57f27d967690811d16d/Mako-1.0.10.tar.gz (460kB) Collecting python-editor>=0.3 (from alembic->-r requirements.txt (line 7)) Downloading https://files.pythonhosted.org/packages/c6/d3/201fc3abe391bbae6606e6f1d598c15d367033332bd54352b12f35513717/python_editor-1.0.4-py3-none-any.whl Requirement already satisfied: python-dateutil in /usr/lib/python3.6/site-packages (from alembic->-r requirements.txt (line 7)) (2.7.3) Collecting billiard<4.0,>=3.6.0 (from celery->-r requirements.txt (line 9)) Downloading https://files.pythonhosted.org/packages/3c/a0/5a01bed569cf1af8fcdd4294590acb980a2788d1594f4ccd678b6fea8644/billiard-3.6.0.0.tar.gz (151kB) Collecting kombu<5.0,>=4.4.0 (from celery->-r requirements.txt (line 9)) Downloading https://files.pythonhosted.org/packages/b7/af/1914e93314f1b98756d5c5e366193124a0ffaab0e6d0e51e0f6f65fa851d/kombu-4.5.0-py2.py3-none-any.whl (185kB) Collecting vine>=1.3.0 (from celery->-r requirements.txt (line 9)) Downloading https://files.pythonhosted.org/packages/7f/60/82c03047396126c8331ceb64da1dc52d4f1317209f32e8fe286d0c07365a/vine-1.3.0-py2.py3-none-any.whl Requirement already satisfied: cycler>=0.10 in /usr/lib/python3.6/site-packages (from matplotlib->-r requirements.txt (line 17)) (0.10.0) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/lib/python3.6/site-packages (from matplotlib->-r requirements.txt (line 17)) (2.2.0) Requirement already satisfied: kiwisolver>=1.0.1 in /usr/lib/python3.6/site-packages (from matplotlib->-r requirements.txt (line 17)) (1.0.1) Requirement already satisfied: setuptools>=2.2 in /usr/lib/python3.6/site-packages (from reportlab->-r requirements.txt (line 22)) (39.2.0) Requirement already satisfied: pip>=1.4.1 in /usr/lib/python3.6/site-packages (from reportlab->-r requirements.txt (line 22)) (10.0.1) Requirement already satisfied: jdcal in /usr/lib/python3.6/site-packages (from openpyxl->-r requirements.txt (line 34)) (1.4) Requirement already satisfied: et_xmlfile in /usr/lib/python3.6/site-packages (from openpyxl->-r requirements.txt (line 34)) (1.0.1) Requirement already satisfied: attrs>=17.4.0 in /usr/lib/python3.6/site-packages (from pytest->-r requirements-dev.txt (line 2)) (18.1.0) Requirement already satisfied: atomicwrites>=1.0 in /usr/lib/python3.6/site-packages (from pytest->-r requirements-dev.txt (line 2)) (1.1.5) Requirement already satisfied: more-itertools>=4.0.0 in /usr/lib/python3.6/site-packages (from pytest->-r requirements-dev.txt (line 2)) (4.2.0) Requirement already satisfied: pluggy<0.7,>=0.5 in /usr/lib/python3.6/site-packages (from pytest->-r requirements-dev.txt (line 2)) (0.6.0) Requirement already satisfied: py>=1.5.0 in /usr/lib/python3.6/site-packages (from pytest->-r requirements-dev.txt (line 2)) (1.5.4) Collecting coverage>=4.4 (from pytest-cov->-r requirements-dev.txt (line 4)) Downloading https://files.pythonhosted.org/packages/f8/4e/f28fc04019bac97d301512d904992791569234a06826cd420f78fba9a361/coverage-4.5.3-cp36-cp36m-manylinux1_x86_64.whl (205kB) Requirement already satisfied: pyflakes<1.7.0,>=1.5.0 in /usr/lib/python3.6/site-packages (from flake8->-r requirements-dev.txt (line 7)) (1.6.0) Requirement already satisfied: pycodestyle<2.4.0,>=2.0.0 in /usr/lib/python3.6/site-packages (from flake8->-r requirements-dev.txt (line 7)) (2.3.1) Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /usr/lib/python3.6/site-packages (from flake8->-r requirements-dev.txt (line 7)) (0.6.1) Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python3.6/site-packages (from Jinja2>=2.10->flask->-r requirements.txt (line 2)) (1.0) Collecting amqp<3.0,>=2.4.0 (from kombu<5.0,>=4.4.0->celery->-r requirements.txt (line 9)) Downloading https://files.pythonhosted.org/packages/42/ec/cbbaa8f75be8cbd019afb9d63258e2bdc95242f8c46a54bb90db5fef03bd/amqp-2.4.2-py2.py3-none-any.whl (49kB) Installing collected packages: sqlalchemy, flask-sqlalchemy, Mako, python-editor, alembic, Flask-Migrate, billiard, vine, amqp, kombu, celery, redis, coverage, pytest-cov Running setup.py install for sqlalchemy: started Running setup.py install for sqlalchemy: finished with status 'done' Running setup.py install for Mako: started Running setup.py install for Mako: finished with status 'done' Running setup.py install for alembic: started Running setup.py install for alembic: finished with status 'done' Running setup.py install for billiard: started Running setup.py install for billiard: finished with status 'done' Successfully installed Flask-Migrate-2.5.2 Mako-1.0.10 alembic-1.0.10 amqp-2.4.2 billiard-3.6.0.0 celery-4.3.0 coverage-4.5.3 flask-sqlalchemy-2.4.0 kombu-4.5.0 pytest-cov-2.7.1 python-editor-1.0.4 redis-3.2.1 sqlalchemy-1.3.3 vine-1.3.0 You are using pip version 10.0.1, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. [32;1m$ yarn test:py:cov[0;m yarn run v1.6.0 $ python3 -m pytest -v -W error::RuntimeWarning --cov=zesje --cov-report=xml:cov.xml --cov-report=html:cov.html --cov-report=term tests/ ============================= test session starts ============================== platform linux -- Python 3.6.5, pytest-3.6.3, py-1.5.4, pluggy-0.6.0 -- /usr/sbin/python3 cachedir: .pytest_cache rootdir: /builds/works-on-my-machine/zesje, inifile: pytest.ini plugins: cov-2.7.1, celery-4.3.0 collecting ... collected 71 items tests/test_check_keypoints.py::test_runtime_error_check_corner_marker[Not enough corner markers] PASSED [ 1%] tests/test_check_keypoints.py::test_runtime_error_check_corner_marker[Too many corner] PASSED [ 2%] tests/test_check_keypoints.py::test_runtime_error_check_corner_marker[Two markers detected in same corner] PASSED [ 4%] tests/test_check_keypoints.py::test_runtime_error_check_corner_marker[Enough markers, evenly spread] PASSED [ 5%] tests/test_database.py::test_exam_generate_token_length_uppercase[No existing token] PASSED [ 7%] tests/test_database.py::test_exam_generate_token_length_uppercase[Existing token] PASSED [ 8%] tests/test_get_student_number.py::test_get_studentnumber_precision PASSED [ 9%] tests/test_pdf_generation.py::test_add_corner_markers_and_bottom_bar[a4] PASSED [ 11%] tests/test_pdf_generation.py::test_add_corner_markers_and_bottom_bar[square] PASSED [ 12%] tests/test_pdf_generation.py::test_generate_id_grid PASSED [ 14%] tests/test_pdf_generation.py::test_generate_pdfs_num_files PASSED [ 15%] tests/test_pdf_generation.py::test_generate_checkboxes[checkboxes0] PASSED [ 16%] tests/test_pdf_generation.py::test_generate_checkboxes[checkboxes1] PASSED [ 18%] tests/test_pdf_generation.py::test_generate_checkboxes[checkboxes2] PASSED [ 19%] tests/test_pdf_generation.py::test_join_pdfs[a4] PASSED [ 21%] tests/test_pdf_generation.py::test_join_pdfs[square] PASSED [ 22%] tests/test_pdf_generation.py::test_generate_datamatrix PASSED [ 23%] tests/test_pregrader.py::test_ideal_crops[box_coords0-True] PASSED [ 25%] tests/test_pregrader.py::test_ideal_crops[box_coords1-False] PASSED [ 26%] tests/test_pregrader.py::test_ideal_crops[box_coords2-True] PASSED [ 28%] tests/test_pregrader.py::test_ideal_crops[box_coords3-True] PASSED [ 29%] tests/test_pregrader.py::test_ideal_crops[box_coords4-True] PASSED [ 30%] tests/test_pregrader.py::test_ideal_crops[box_coords5-True] PASSED [ 32%] tests/test_pregrader.py::test_shifted_crops[1 filled bottom right] PASSED [ 33%] tests/test_pregrader.py::test_shifted_crops[1 filled top left] PASSED [ 35%] tests/test_pregrader.py::test_shifted_crops[5 filled with a bit of 6] PASSED [ 36%] tests/test_pregrader.py::test_shifted_crops[4 fully filled with the label] PASSED [ 38%] tests/test_pregrader.py::test_shifted_crops[6 empty with label] PASSED [ 39%] tests/test_pregrader.py::test_shifted_crops[7 partially cropped, filled and a part of 6] PASSED [ 40%] tests/test_rotation_scan.py::test_calc_angle[Same horizontal line] PASSED [ 42%] tests/test_rotation_scan.py::test_calc_angle[Same vertical line] PASSED [ 43%] tests/test_rotation_scan.py::test_calc_angle[Negative angle] PASSED [ 45%] tests/test_rotation_scan.py::test_calc_angle[Positive angle] PASSED [ 46%] tests/test_rotation_scan.py::test_detect_enough_cornermarkers[latex1.jpg] PASSED [ 47%] tests/test_rotation_scan.py::test_detect_enough_cornermarkers[latex3.jpg] PASSED [ 49%] tests/test_rotation_scan.py::test_detect_enough_cornermarkers[latex5.jpg] PASSED [ 50%] tests/test_rotation_scan.py::test_detect_enough_cornermarkers[jamy2.jpg] PASSED [ 52%] tests/test_rotation_scan.py::test_detect_enough_cornermarkers[latex6.jpg] PASSED [ 53%] tests/test_rotation_scan.py::test_detect_enough_cornermarkers[latex4.jpg] PASSED [ 54%] tests/test_rotation_scan.py::test_detect_enough_cornermarkers[jamy1.jpg] PASSED [ 56%] tests/test_rotation_scan.py::test_detect_enough_cornermarkers[latex2.jpg] PASSED [ 57%] tests/test_rotation_scan.py::test_detect_valid_cornermarkers[latex1.jpg] PASSED [ 59%] tests/test_rotation_scan.py::test_detect_valid_cornermarkers[latex3.jpg] PASSED [ 60%] tests/test_rotation_scan.py::test_detect_valid_cornermarkers[latex5.jpg] PASSED [ 61%] tests/test_rotation_scan.py::test_detect_valid_cornermarkers[jamy2.jpg] PASSED [ 63%] tests/test_rotation_scan.py::test_detect_valid_cornermarkers[latex6.jpg] PASSED [ 64%] tests/test_rotation_scan.py::test_detect_valid_cornermarkers[latex4.jpg] PASSED [ 66%] tests/test_rotation_scan.py::test_detect_valid_cornermarkers[jamy1.jpg] PASSED [ 67%] tests/test_rotation_scan.py::test_detect_valid_cornermarkers[latex2.jpg] PASSED [ 69%] tests/test_scans.py::test_decode_barcode[Simple test 1] PASSED [ 70%] tests/test_scans.py::test_decode_barcode[Simple test 2] PASSED [ 71%] tests/test_scans.py::test_decode_barcode[High numbers] PASSED [ 73%] tests/test_scans.py::test_pipeline FAILED [ 74%] tests/test_scans.py::test_noise[Low noise] FAILED [ 76%] tests/test_scans.py::test_noise[Medium noise] FAILED [ 77%] tests/test_scans.py::test_noise[High noise] PASSED [ 78%] tests/test_scans.py::test_rotate[Large rot] PASSED [ 80%] tests/test_scans.py::test_rotate[Small rot] FAILED [ 81%] tests/test_scans.py::test_rotate[Medium rot] PASSED [ 83%] tests/test_scans.py::test_rotate[failing rot] PASSED [ 84%] tests/test_scans.py::test_scale[smaller scale] FAILED [ 85%] tests/test_scans.py::test_scale[larger scale] PASSED [ 87%] tests/test_scans.py::test_skew[small skew] FAILED [ 88%] tests/test_scans.py::test_skew[larger skew] FAILED [ 90%] tests/test_scans.py::test_all_effects[1st full test] FAILED [ 91%] tests/test_scans.py::test_all_effects[second full test] FAILED [ 92%] tests/test_scans.py::test_image_extraction[blank pdf] PASSED [ 94%] tests/test_scans.py::test_image_extraction[flattened pdf] PASSED [ 95%] tests/test_three_corners.py::test_three_straight_corners_1 PASSED [ 97%] tests/test_three_corners.py::test_three_straight_corners_2 PASSED [ 98%] tests/test_three_corners.py::test_pdf PASSED [100%] =================================== FAILURES =================================== ________________________________ test_pipeline _________________________________ new_exam = ExamMetadata(token='IHQYZAFOWVQX', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data' def test_pipeline(new_exam, datadir): genPDF = generate_pdf(new_exam, 5) for image in makeImage(genPDF): > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:196: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], ...[255, 255, 255], ..., [255, 255, 255], [255, 255, 255], [255, 255, 255]]], dtype=uint8) corner_keypoints = [(28, 28), (562, 28), (28, 812), (563, 812)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError ____________________________ test_noise[Low noise] _____________________________ new_exam = ExamMetadata(token='NHABIKFPQOWG', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data', threshold = 0.02 expected = True @pytest.mark.parametrize('threshold, expected', [ (0.02, True), (0.12, True), (0.92, False)], ids=['Low noise', 'Medium noise', 'High noise']) def test_noise(new_exam, datadir, threshold, expected): genPDF = generate_pdf(new_exam, 1) for image in makeImage(genPDF): image = apply_whitenoise(image, threshold) > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[253, 254, 253], [251, 253, 251], [250, 254, 253], ..., [250, 251, 250], ...[250, 252, 254], ..., [254, 252, 250], [250, 252, 250], [254, 252, 251]]], dtype=uint8) corner_keypoints = [(28, 28), (562, 28), (28, 812), (563, 812)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError ----------------------------- Captured stdout call ----------------------------- [[[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] ... [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]]] (842, 592, 3) ___________________________ test_noise[Medium noise] ___________________________ new_exam = ExamMetadata(token='IVVQQOLVCDFM', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data', threshold = 0.12 expected = True @pytest.mark.parametrize('threshold, expected', [ (0.02, True), (0.12, True), (0.92, False)], ids=['Low noise', 'Medium noise', 'High noise']) def test_noise(new_exam, datadir, threshold, expected): genPDF = generate_pdf(new_exam, 1) for image in makeImage(genPDF): image = apply_whitenoise(image, threshold) > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[232, 224, 225], [226, 250, 249], [234, 230, 241], ..., [250, 226, 251], ...[228, 233, 235], ..., [235, 226, 247], [226, 249, 239], [226, 234, 242]]], dtype=uint8) corner_keypoints = [(28, 28), (562, 28), (28, 812), (563, 812)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError ----------------------------- Captured stdout call ----------------------------- [[[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] ... [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]] [[255 255 255] [255 255 255] [255 255 255] ... [255 255 255] [255 255 255] [255 255 255]]] (842, 592, 3) ____________________________ test_rotate[Small rot] ____________________________ new_exam = ExamMetadata(token='LTFGFRKXEDBL', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data', rotation = 0.5 expected = True @pytest.mark.parametrize('rotation, expected', [ (-2, True), (0.5, True), (0.8, True), (2, False)], ids=['Large rot', 'Small rot', 'Medium rot', 'failing rot']) def test_rotate(new_exam, datadir, rotation, expected): genPDF = generate_pdf(new_exam, 1) for image in makeImage(genPDF): image = apply_scan(img=image, rotation=rotation) # image.show() > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:224: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], ...[255, 255, 255], ..., [255, 255, 255], [255, 255, 255], [255, 255, 255]]], dtype=uint8) corner_keypoints = [(25, 30), (560, 26), (31, 815), (566, 811)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError __________________________ test_scale[smaller scale] ___________________________ new_exam = ExamMetadata(token='IEVFCGFWMJUX', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data', scale = 0.99 expected = True @pytest.mark.parametrize('scale, expected', [ (0.99, True), (1.1, False)], ids=['smaller scale', 'larger scale']) def test_scale(new_exam, datadir, scale, expected): genPDF = generate_pdf(new_exam, 1) for image in makeImage(genPDF): image = apply_scan(img=image, scale=scale) # image.show() > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:237: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], ...[255, 255, 255], ..., [255, 255, 255], [255, 255, 255], [255, 255, 255]]], dtype=uint8) corner_keypoints = [(27, 27), (557, 28), (28, 804), (557, 803)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError ____________________________ test_skew[small skew] _____________________________ new_exam = ExamMetadata(token='ZENVMREXGCZX', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data', skew = (10, 10) expected = True @pytest.mark.parametrize('skew, expected', [ ((10, 10), True), ((-10, -5), True)], ids=['small skew', 'larger skew']) def test_skew(new_exam, datadir, skew, expected): genPDF = generate_pdf(new_exam, 1) for image in makeImage(genPDF): image = apply_scan(img=image, skew=skew) # image.show() > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:250: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], ...[255, 255, 255], ..., [255, 255, 255], [255, 255, 255], [255, 255, 255]]], dtype=uint8) corner_keypoints = [(38, 38), (573, 38), (38, 823), (572, 823)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError ____________________________ test_skew[larger skew] ____________________________ new_exam = ExamMetadata(token='LXVNEOKNRJZE', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data', skew = (-10, -5) expected = True @pytest.mark.parametrize('skew, expected', [ ((10, 10), True), ((-10, -5), True)], ids=['small skew', 'larger skew']) def test_skew(new_exam, datadir, skew, expected): genPDF = generate_pdf(new_exam, 1) for image in makeImage(genPDF): image = apply_scan(img=image, skew=skew) # image.show() > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:250: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], ...[255, 255, 255], ..., [255, 255, 255], [255, 255, 255], [255, 255, 255]]], dtype=uint8) corner_keypoints = [(18, 23), (553, 23), (18, 808), (553, 808)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError _______________________ test_all_effects[1st full test] ________________________ new_exam = ExamMetadata(token='YJWXKBYUZLJN', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data', rotation = 0.5 scale = 0.99, skew = (10, 10), expected = True @pytest.mark.parametrize('rotation, scale, skew, expected', [ (0.5, 0.99, (10, 10), True), (0.5, 1.01, (-10, -5), True)], ids=['1st full test', 'second full test']) def test_all_effects( new_exam, datadir, rotation, scale, skew, expected): genPDF = generate_pdf(new_exam, 1) for image in makeImage(genPDF): image = apply_scan( img=image, rotation=rotation, scale=scale, skew=skew) # image.show() > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:266: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], ...[255, 255, 255], ..., [255, 255, 255], [255, 255, 255], [255, 255, 255]]], dtype=uint8) corner_keypoints = [(34, 39), (564, 35), (40, 816), (570, 812)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError ______________________ test_all_effects[second full test] ______________________ new_exam = ExamMetadata(token='JLSNOTERDVID', barcode_coords=[40, 90, 510, 560]) datadir = '/builds/works-on-my-machine/zesje/tests/data', rotation = 0.5 scale = 1.01, skew = (-10, -5), expected = True @pytest.mark.parametrize('rotation, scale, skew, expected', [ (0.5, 0.99, (10, 10), True), (0.5, 1.01, (-10, -5), True)], ids=['1st full test', 'second full test']) def test_all_effects( new_exam, datadir, rotation, scale, skew, expected): genPDF = generate_pdf(new_exam, 1) for image in makeImage(genPDF): image = apply_scan( img=image, rotation=rotation, scale=scale, skew=skew) # image.show() > success, reason = scans.process_page(image, new_exam, datadir) tests/test_scans.py:266: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ zesje/scans.py:344: in process_page add_feedback_to_solution(sub, exam, barcode.page, image_array, corner_keypoints) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sub = <Submission 1>, exam = <Exam 1>, page = 0 page_img = array([[[255, 255, 255], [255, 255, 255], [255, 255, 255], ..., [255, 255, 255], ...[255, 255, 255], ..., [255, 255, 255], [255, 255, 255], [255, 255, 255]]], dtype=uint8) corner_keypoints = [(15, 25), (555, 21), (21, 818), (561, 814)] def add_feedback_to_solution(sub, exam, page, page_img, corner_keypoints): """ Adds the multiple choice options that are identified as marked as a feedback option to a solution Parameters ------ sub : Submission the current submission exam : Exam the current exam page_img : Image image of the page corner_keypoints : array locations of the corner keypoints as (x, y) tuples """ problems_on_page = [problem for problem in exam.problems if problem.widget.page == page] > top_left_point, fixed_corner_keypoints = fix_corner_markers(corner_keypoints, page_img.shape) E ValueError: too many values to unpack (expected 2) zesje/pregrader.py:25: ValueError ----------- coverage: platform linux, python 3.6.5-final-0 ----------- Name Stmts Miss Cover ----------------------------------------------- zesje/__init__.py 18 4 78% zesje/__main__.py 5 5 0% zesje/_static_version.py 3 3 0% zesje/_version.py 99 40 60% zesje/api/__init__.py 40 0 100% zesje/api/_helpers.py 10 5 50% zesje/api/emails.py 107 77 28% zesje/api/exams.py 189 148 22% zesje/api/export.py 25 20 20% zesje/api/feedback.py 55 39 29% zesje/api/graders.py 18 8 56% zesje/api/images.py 27 21 22% zesje/api/mult_choice.py 60 47 22% zesje/api/problems.py 54 38 30% zesje/api/scans.py 35 24 31% zesje/api/signature.py 23 17 26% zesje/api/solutions.py 68 55 19% zesje/api/students.py 61 44 28% zesje/api/submissions.py 38 29 24% zesje/api/summary_plot.py 58 47 19% zesje/api/widgets.py 22 17 23% zesje/database.py 119 2 98% zesje/datamatrix.py 14 13 7% zesje/emails.py 62 47 24% zesje/factory.py 31 3 90% zesje/images.py 49 11 78% zesje/pdf_generation.py 112 10 91% zesje/pregrader.py 52 15 71% zesje/scans.py 363 99 73% zesje/statistics.py 57 50 12% ----------------------------------------------- TOTAL 1874 938 50% Coverage HTML written to dir cov.html Coverage XML written to file cov.xml ===================== 9 failed, 62 passed in 37.75 seconds ===================== error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. section_end:1558970439:build_script [0Ksection_start:1558970439:after_script [0Ksection_end:1558970441:after_script [0Ksection_start:1558970441:upload_artifacts_on_failure [0Ksection_end:1558970443:upload_artifacts_on_failure [0K[31;1mERROR: Job failed: exit code 1 [0;m