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

[chores] Improve test suite

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
backend, testing

調査の方向性

まず tests.snmp.base.TestSNMP と既存の AirOS および OpenWrt バックエンドテストを確認します。記載されている OpenWRT および AirOS のメソッドのカバレッジを確認し、その後、モックに package-local テストと snmpsim を使用することを検討します。テストの構成と不足している SNMP カバレッジについて、方針が決定され、実装されていれば完了です。

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

説明

Follow up to #48 / #46

  • Configure nose to automatically find test files. This will eliminate the need of importing modules in __init__.py. Prefixing test file names with test_ should do most of the work, (Done in #59)
  • Add tests for missing coverage. Most of the missing coverage can be easily tested. (To be done in #62)
  • Add .coveragerc file as done here: https://github.com/openwisp/openwisp-controller/blob/master/.coveragerc (Done in #59)
  • Use logger instead of print statements. Check if there's a difference between logger module of Python 2 and Python 3. If there is, delegate this to https://github.com/openwisp/netengine/issues/49 (Done in #59)

Open for discussion

  • Consider moving some tests inside the package like we do for other modules. This enables users to run or extend tests.
  • Currently most parts of netengine.backends.snmp.SNMP are not tested directly in tests.snmp.base.TestSNMP but they are tested in tests for AirOS and OpenWrt backend. Do we want to keep it this way or find a way to make tests more modular?
  • There is lack of proper tests for following methods of netengine.backends.snmp.OpenWRT:
    • get_interfaces
    • interfaces_MAC
    • interfaces_speed
    • interfaces_state
    • interfaces_bytes
    • interfaces_type
    • interface_addr_and_mask
  • The above point also applies on netengine.backends.snmp.AirOS
  • Using snmpsim for mocking an SNMP device
主要言語
Python
スター
42
フォーク
18
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

openwisp/netengine のほかの issue

openwisp/netengine の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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