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

Specify dependency of each test case

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
testing, tooling

調査の方向性

まず、テストメソッドと既存の array_helpers およびモジュールスタブ機構を確認します。次に、pytest の collection hook と、テストスイートがトップレベル関数、配列オブジェクトのメソッド、演算子をどのように表現しているかを調査します。完了時には、定義された依存関係表現、依存関係グラフ、依存関係を考慮したテストの優先順位付けまたはスキップを含める必要があります。

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

説明

low priority

The test suite is mostly made up of test methods for each function (or array object method) in the spec. The majority of these tests require other functions to do everything we want, which is problematic when an underlying function does not work—you'll get a lot of spammy errors that actually relate to a single fundamental problem... or even false positives.

So I think it would be a good idea if we declared the dependencies of each test method, i.e. the functions we use and assume has correct behaviour. We could use these declarations to create a dependency graph, which could be hooked with pytest to prioritise zero/low-dependency tests first, and by default skipping tests that use functions we've deemed incorrect. This will benefit:

  1. Array API adoptors, who would much more easily see what they should prioritise developing
  2. Us, who'd be able to see areas where we can try to cut down the functions we depend on

Ideas for declaring dependencies per test method:

  • Decorator which lists function and method names
  • Automatically infer dependencies via looking at function code (either searching the code as string, or using the AST)

General challenges would be:

  • How to get pytests collection hook to do this
  • Supporting array object methods alongside the top-level functions
    • As well as operator symbols

The dependency graph + auto skipping would also allow us to:

  • Remove some mirrored functions in array_helpers
  • Remove the module stubbing mechanism
  • Check that no tests is using the function they're testing for assertions
主要言語
Python
スター
74
フォーク
54
平均マージ
4時間 35分
マージ済み PR(30日)
4

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

data-apis/array-api-tests のほかの issue

data-apis/array-api-tests の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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