Split cli_tst.py? #2716

Closed
pde opened this Issue Mar 25, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@pde
Member

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

This comment has been minimized.

Show comment
Hide comment
@pde

pde Mar 25, 2016

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@pde

pde Mar 25, 2016

Member

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().

Member

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

This comment has been minimized.

Show comment
Hide comment
@bmw

bmw Mar 25, 2016

Contributor

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.

Contributor

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.

bmw added a commit that referenced this issue Oct 10, 2016

pde added a commit that referenced this issue Oct 10, 2016

Create symlinks at runtime and don't use relative paths (#3600)
* 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 and don't use relative paths (#3600)
* 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

@ohemorange ohemorange closed this in #3828 Dec 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment