audreyfeldroy/cookiecutter-pypackage

[Bug] Argparse Unit Test Typo

PratikBhusal opened this issue · 1 comments

  • Date you used Cookiecutter PyPackage: 2020 June 27
  • Cookiecutter version used, if any: 1.7.2
  • Python version, if any: 3.8.3
  • Operating System: Arch Linux

Description

There was a typo in the unit test. pytest-cookies is case sensitive so using argparse would actually make use of the click library in the generated template.

Now, a prior assertion fails. This bug seems to stem from the fact that click.testing.CliRunner does not support argparse. A slightly modified unit test should in theory fix the issue.

What I Did

I fixed that, but the new assertion statement that should verify that click was not imported is returning false. Some work needs to be done to fix the unit test most likely.

Below is a forked version of the most recent version as of 2020 June 27:

Fixed argparse type and added another assertion

Below is the Travis-Ci results based on this commit:

Travis-CI

I was able to fix the issue on my personal cookiecutter python package template. Here is the relevant commit:

Fixed argparse unit test

I will have a pull request that will hopefully fix this issue out soon.