Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split cli_tst.py? #2716

Closed
pde opened this issue Mar 25, 2016 · 3 comments · Fixed by #3828
Closed

Split cli_tst.py? #2716

pde opened this issue Mar 25, 2016 · 3 comments · Fixed by #3828

Comments

@pde
Copy link
Member

@pde pde commented Mar 25, 2016

The incentive to do this is fairly low compared to the crazy amount of work involved, but cli_tst.py should probably be split into pieces to test main, cli and plugins.selection separately.

@pde pde added this to the Wishlist milestone Mar 25, 2016
@pde
Copy link
Member Author

@pde pde commented Mar 25, 2016

The big problem is that most tests in that file use some variant of _call as their entry point; they will need to change to calling more specific targets, which basically means rewriting a lot of tests.

@pde
Copy link
Member Author

@pde pde commented Mar 25, 2016

One small cleanup this would allow: switching things like from letsencrypt.plugins import disco as plugins_disco ... plugins_disco.PluginsRegistry.find_all() to just from blah import PluginsRegistery .. PluginsRegistry.find_all().

@bmw
Copy link
Member

@bmw bmw commented Mar 25, 2016

I think this should definitely be done at some point. I think it will almost be easiest to write the tests from scratch.

If someone takes a crack at this, it'll be much easier to write them as unit tests, testing only a specific function or two at a time, instead of always calling main.main and having to mock out a dozen classes/functions.

pde pushed a commit that referenced this issue Oct 10, 2016
* Create symlinks at runtime in cli_test.py

* use test_util.vector_path rather than hardcoding path

* Reference #2716 in comment about too many lines in cli.py
bmw added a commit that referenced this issue Oct 13, 2016
* Create symlinks at runtime in cli_test.py

* use test_util.vector_path rather than hardcoding path

* Reference #2716 in comment about too many lines in cli.py
@bmw bmw removed this from the Wishlist milestone Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants