redacted / XKCD-password-generator

Generate secure multiword passwords/passphrases, inspired by XKCD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unit tests should not execute Python subprocess

bignose-debian opened this issue · comments

The unit test suite currently executes a Python interpreter in a sub-process. This should not be necessary, as the functionality to be tested is available by just calling a function — and this makes for a more tightly-defined test case.

Coupling the narrowly-defined test cases to a whole subprocess is fragile, and results in issues like issue #98.

Instead, the test cases should each invoke just a function in the ‘xkcd_password’ library, and test the result of calling that function.

I have implemented a change set to resolve this. See the branch ‘wip/issue/test-command-behaviour-via-function’ in my personal fork. This branch currently merges cleanly to ‘master’.

Thanks for the fork - this is merged (along with some fixes for python2.7) in the latest releases