Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

24.7.2: Testing fails without the `TOX_PACKAGE` environment variable

オープン
#110 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
testing-qa

調査の方向性

Start with tests/test_examples.py, especially build_and_install at line 35, and run the example tests without TOX_PACKAGE. Trace how the tests obtain the incremental package, using the reported failures as a guide. Done means the eight example tests pass when that environment variable is unset.

索引モデルが issue の本文から書いたものです。

説明

When I run tests without the TOX_PACKAGE environment variable set then several tests fails:

py39: commands[5]> coverage run /usr/bin/trial tests/test_examples.py
test_examples
  ExampleTests
    test_hatchling_get_version ...                                      [ERROR]
    test_noop ...                                                       [ERROR]
    test_setuppy_version ...                                            [ERROR]
    test_setuptools_bad_versionpy ...                                    [FAIL]
    test_setuptools_missing_versionpy ...                               [ERROR]
    test_setuptools_no_optin ...                                        [ERROR]
    test_setuptools_no_package ...                                      [ERROR]
    test_setuptools_version ...                                         [ERROR]

===============================================================================
[FAIL]
Traceback (most recent call last):
  File "tests/test_examples.py", line 184, in test_setuptools_bad_versionpy
    build_and_install(src)
  File "/usr/lib/python3.9/vendor-packages/twisted/trial/_synctest.py", line 355, in __exit__
    self._testCase.fail(
twisted.trial.unittest.FailTest: builtins.KeyError raised instead of BuildBackendException:
 Traceback (most recent call last):
  File "/usr/lib/python3.9/vendor-packages/twisted/trial/_asynctest.py", line 124, in _run
    d = defer.maybeDeferred(
  File "/usr/lib/python3.9/vendor-packages/twisted/internet/defer.py", line 212, in maybeDeferred
    result = f(*args, **kwargs)
  File "/usr/lib/python3.9/vendor-packages/twisted/internet/utils.py", line 223, in runWithWarningsSuppressed
    result = f(*a, **kw)
  File "tests/test_examples.py", line 184, in test_setuptools_bad_versionpy

--- <exception caught here> ---
  File "tests/test_examples.py", line 184, in test_setuptools_bad_versionpy

  File "tests/test_examples.py", line 35, in build_and_install

  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
builtins.KeyError: 'TOX_PACKAGE'


test_examples.ExampleTests.test_setuptools_bad_versionpy
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "tests/test_examples.py", line 190, in test_hatchling_get_version
    build_and_install(TEST_DIR.child("example_hatchling"))
  File "tests/test_examples.py", line 35, in build_and_install
    "incremental @ file://" + os.environ["TOX_PACKAGE"],
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
builtins.KeyError: 'TOX_PACKAGE'

test_examples.ExampleTests.test_hatchling_get_version
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "tests/test_examples.py", line 205, in test_noop
    build_and_install(TEST_DIR.child("example_noop"))
  File "tests/test_examples.py", line 35, in build_and_install
    "incremental @ file://" + os.environ["TOX_PACKAGE"],
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
builtins.KeyError: 'TOX_PACKAGE'

test_examples.ExampleTests.test_noop
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "tests/test_examples.py", line 54, in test_setuppy_version
    build_and_install(TEST_DIR.child("example_setuppy"))
  File "tests/test_examples.py", line 35, in build_and_install
    "incremental @ file://" + os.environ["TOX_PACKAGE"],
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
builtins.KeyError: 'TOX_PACKAGE'

test_examples.ExampleTests.test_setuppy_version
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "tests/test_examples.py", line 149, in test_setuptools_missing_versionpy
    build_and_install(src)
  File "tests/test_examples.py", line 35, in build_and_install
    "incremental @ file://" + os.environ["TOX_PACKAGE"],
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
builtins.KeyError: 'TOX_PACKAGE'

test_examples.ExampleTests.test_setuptools_missing_versionpy
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "tests/test_examples.py", line 94, in test_setuptools_no_optin
    build_and_install(src)
  File "tests/test_examples.py", line 35, in build_and_install
    "incremental @ file://" + os.environ["TOX_PACKAGE"],
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
builtins.KeyError: 'TOX_PACKAGE'

test_examples.ExampleTests.test_setuptools_no_optin
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "tests/test_examples.py", line 115, in test_setuptools_no_package
    build_and_install(src)
  File "tests/test_examples.py", line 35, in build_and_install
    "incremental @ file://" + os.environ["TOX_PACKAGE"],
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
builtins.KeyError: 'TOX_PACKAGE'

test_examples.ExampleTests.test_setuptools_no_package
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "tests/test_examples.py", line 65, in test_setuptools_version
    build_and_install(TEST_DIR.child("example_setuptools"))
  File "tests/test_examples.py", line 35, in build_and_install
    "incremental @ file://" + os.environ["TOX_PACKAGE"],
  File "/usr/lib/python3.9/os.py", line 679, in __getitem__
    raise KeyError(key) from None
builtins.KeyError: 'TOX_PACKAGE'

test_examples.ExampleTests.test_setuptools_version
-------------------------------------------------------------------------------
Ran 8 tests in 0.070s

FAILED (failures=1, errors=7)
主要言語
Python
スター
144
フォーク
21
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

twisted/incremental のほかの issue

twisted/incremental の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。