Pythonでのテストを自動化できるライブラリ「tox」のインストール

スポンサーリンク

Pythonでのテストを自動化および標準化することを目的としたライブラリ「tox」のインストールについて解説しています。

「tox(https://tox.wiki/en/latest/)」は、コマンドライン駆動型のCIフロントエンドと開発タスクの自動化ツールです。

■Python

今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)

■toxをインストールする

toxをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。

pip install tox

起動後、上記のコマンドを入力し、Enterキーを押します。

なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、pipを使う場合にはコマンドでの切り替えを行います。

py -3.8 -m pip install tox

切り替えるために、上記のコマンドを入力し、Enterキーを押します。

Defaulting to user installation because normal site-packages is not writeable
Collecting tox
Downloading tox-3.24.5-py2.py3-none-any.whl (85 kB)
|████████████████████████████████| 85 kB 772 kB/s
Requirement already satisfied: toml>=0.9.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from tox) (0.10.2)
Requirement already satisfied: six>=1.14.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from tox) (1.15.0)
Requirement already satisfied: pluggy>=0.12.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from tox) (0.13.1)
Requirement already satisfied: packaging>=14 in c:\users\user_\appdata\roaming\python\python38\site-packages (from tox) (20.9)
Requirement already satisfied: py>=1.4.17 in c:\users\user_\appdata\roaming\python\python38\site-packages (from tox) (1.10.0)
Requirement already satisfied: colorama>=0.4.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from tox) (0.4.4)
Requirement already satisfied: virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from tox) (20.9.0)
Requirement already satisfied: filelock>=3.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from tox) (3.3.1)
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from packaging>=14->tox) (2.4.7)
Requirement already satisfied: distlib<1,>=0.3.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox) (0.3.3)
Requirement already satisfied: backports.entry-points-selectable>=1.0.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox) (1.1.0)
Requirement already satisfied: platformdirs<3,>=2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox) (2.4.0)
Installing collected packages: tox
Successfully installed tox-3.24.5

Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、toxが正常にインストールされたことになります。

なお、今回はtoxのバージョン3.24.5をインストールしました。

コメント

タイトルとURLをコピーしました