Skip to main content

omegaUp

Library for interacting with omegaUp.

omegaup.validator.validatortest

Allows an input validator to be modeled as a standard unit test.

To use, write your validator as if it were a normal unittest.TestCase:

import logging
import unittest
import sys

from omegaup.validator import validatortest


class MyTest(unittest.TestCase):
  def test_foo(self):
    contestant_output = sys.stdin
    case_name = sys.argv[1]
    with open('data.in', 'r') as original_input, \
         open('data.out', 'r') as original_output:
        logging.info('This will be printed to stderr')

        self.assertAlmostEqual(
            float(contestant_output.readline().strip()),
            float(original_output.readline().strip()))


if __name__ == '__main__':
    validatortest.main()

Release files for omegaup 2.0.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omegaup 2.0.18
File Size Uploaded
omegaup-2.0.18.tar.gz 75.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for omegaup 2.0.18
File Interpreter ABI Platform
omegaup-2.0.18-py3-none-any.whl Python 3 none any Details

Total release size: 151.7 kB

Release files / omegaup-2.0.18.tar.gz

Download URL omegaup-2.0.18.tar.gz
Size 75.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c0c8c5da94544eb1b490aeaccf03c4489e7c27551947a77ace9641ec061af28a
BLAKE2b-256 checksum
How to use checksums
6f776e64b6dff915e33840d5818f0478f1f0b602813c5e91e09baff456d2e5af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / omegaup-2.0.18-py3-none-any.whl

Download URL omegaup-2.0.18-py3-none-any.whl
Size 76.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9de8b76ea8f38ecdadbb2f8f052dfaac9b9eff41f0250486215958113f48736
BLAKE2b-256 checksum
How to use checksums
4de6aa5f5d8b8ca0b03bd4e388fd9735d6d11e142a0fe1406a3cead45dc94ba3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

2.0.18 This release

2 release files

2.0.15

2 release files

2.0.12

2 release files

2.0.11

2 release files

2.0.10

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.3

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.5.4

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page