Skip to main content

Auto-Python-Tester

Python Versions PyPI - Wheel PyPI - Implementation PyPI - Version License: MIT Downloads

Pythonで競技プログラミングをするときに、テストを自動で実行してくれるパッケージです。

テストに成功すると、成功表示がでて

テスト失敗すると、失敗表示が出てテストのデータとソースの結果を表示してくれます。

注意点

おそらく、 Python 3.5以上対応です。

インストール方法

$ pip install ApTester

使い方

使うには二つのファイルが必要になります。

  • 実行するPythonファイル
  • テストが書いてあるファイル(*.txt)
$ Aptester Testcases.txt main.py

※-m を使っていなければaptesterでも可能です。

pythonファイルの書き方

普通に入力と出力のあるファイルであれば問題ないです

テストケースの書き方

-テスト名-
テストの標準入力
_テスト名_
テストの正しい出力
END

簡単なテンプレート

Pythonファイル

num1, num2 = map(int, input().split())
num3, num4 = map(int, input().split())
print(num1 + num2)
print(num3 + num4)

テストケースのテンプレート

-TEST1-
1 2
2 5
_TEST1_
3
7
END

-TEST2-
2 3
3 3
_TEST2_
5
6
END

-テスト名-

ハイフンの間にテスト名を決めて書いてください 一文字以上であればなんでも大丈夫です。

_テスト名_

-テスト名-で決めたものと同じ物を書いてください。 -テスト名-と_テスト名_間は標準入力が入る場所です

テストの標準入力

実行するときに必要な入力を書いてください。

テストの正しい出力

正解の出力を書いてください。

ENDについて

テスト名とENDの間にはコメントを書くことも可能です

Metadata

Release files for ApTester 0.1.4

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

Source distribution (sdist)

Source distribution for ApTester 0.1.4
File Size Uploaded Provenance Actions
ApTester-0.1.4.tar.gz 5.6 kB Without provenance Details for ApTester-0.1.4.tar.gz

Built distribution (wheel)

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

Total release size: 11.5 kB

Release files / ApTester-0.1.4.tar.gz

Download URL ApTester-0.1.4.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
24caa529e63204038311709555d0bc423c346cf37b4363878f21f6af10f0f9c4
BLAKE2b-256 checksum
How to use checksums
6bd00ac78cb9e68998c601ed9a4a55154fe5bdf9c101eb0949d9da8f8e407e28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Release files / ApTester-0.1.4-py3-none-any.whl

Download URL ApTester-0.1.4-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aab3b6be2aee5896a246927558e097dcbf4baf47843c216bd1cd60da00f32cde
BLAKE2b-256 checksum
How to use checksums
4102557f6695f426e064f3efb46ec7401a928c7847aca21eb45cf228d791ec60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

Security for ApTester 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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