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

Reduce tests which require the network #990

Closed
atugushev opened this issue Nov 16, 2019 · 3 comments · Fixed by #998
Closed

Reduce tests which require the network #990

atugushev opened this issue Nov 16, 2019 · 3 comments · Fixed by #998
Assignees
Labels
help wanted Request help from the community refactor Refactoring code tests Testing and related things

Comments

@atugushev
Copy link
Member

atugushev commented Nov 16, 2019

What's the problem this feature will solve?

Currently, we have 13 tests that require the internet. We could reduce this number to 3. All tests marked as @pytest.mark.network could be refactored to use local package small-fake-with-deps, except probably those tests, which related to URL/VCS packages:

  • test_editable_package_vcs
  • test_generate_hashes_with_url

or do realistic (functional) tests, which is test_realistic_complex_sub_dependencies.

Describe the solution you'd like

  1. Replace six and setuptools requirements with small-fake-a and small-fake-b in tests/test_data/packages/small_fake_with_deps/setup.py
  2. Refactor the following tests to use small-fake-with-deps package:
  • test_editable_package
  • test_locally_available_editable_package_is_not_archived_in_cache_dir
  • test_generate_hashes_with_editable
  • test_generate_hashes_verbose
  • test_allow_unsafe_option
  • test_get_hashes_local_repository_cache_miss
  • test_generate_hashes_all_platforms
  • test_generate_hashes_without_interfering_with_each_other
  • test_editable_top_level_deps_preserved
  1. Move parameters related to small-fake-with-deps from test_url_package to a separate test test_local_url_package and replace six to small-fake-a.
  2. Remove small-fake-with-deps-a package and its wheels, and refactor test_annotate_option to use small-fake-with-deps.

Alternative Solutions

N/A

Additional context

N/A

@atugushev atugushev added refactor Refactoring code tests Testing and related things labels Nov 16, 2019
@atugushev atugushev added the help wanted Request help from the community label Nov 16, 2019
@atugushev
Copy link
Member Author

atugushev commented Nov 22, 2019

@hramezani would you like to pick this up?

@hramezani
Copy link
Member

@atugushev, yes. Assign it to me.

@atugushev
Copy link
Member Author

@hramezani, thanks!

@atugushev atugushev changed the title Reduce tests which requires the network Reduce tests which require the network Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Request help from the community refactor Refactoring code tests Testing and related things
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants