forked from conda-forge/conda-smithy
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve test suite #13
Open
hulkoba
wants to merge
17
commits into
main
Choose a base branch
from
add_snapshots
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0e1170a
chore: install pytest-mock
hulkoba 26c9e3f
refactor(test anaconda token): replace unittest with pytest-mock
hulkoba 1b7aa87
refactor(test feedstock tokens): remove unittest
hulkoba 428fd22
refactor(test lint recipe): remove unittest
hulkoba 4707271
refactor(test feedstock io): remove unittest
hulkoba 7e96b81
chore(deps): install syrupy for snapshot testing
hulkoba 6bd4e66
test(ci_skeleton): add snapshots
hulkoba 3c50870
test(cli): add snapshots
hulkoba 9d56bdf
test(configure feedstock): add snapshots
hulkoba fe564c2
test(variant_algebra): add snapshots
ninetteadhikari 9ec7345
test(lint recipe): add snapshots
hulkoba 814f9db
test(anaconda_token_rotation): add snapshots
hulkoba 37b24fe
test(feedstock tokens): add snapshots
hulkoba a9a934d
lint: ignore snapshots
hulkoba 7c2cc98
add news entry
hulkoba e51544e
test(snapshots): add rattler-build snapshots
hulkoba 334d917
lint: test_lint_recipe
hulkoba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
**Added:** | ||
|
||
* pytest-mock | ||
* syrupy | ||
|
||
**Changed:** | ||
|
||
* Replace unittest with pytest | ||
* Add snapshot tests | ||
|
||
**Deprecated:** | ||
|
||
* <news item> | ||
|
||
**Removed:** | ||
|
||
* unittest | ||
|
||
**Fixed:** | ||
|
||
* <news item> | ||
|
||
**Security:** | ||
|
||
* <news item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
# serializer version: 1 | ||
# name: test_rotate_anaconda_token_notoken[False-False-False-False-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-False-False-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-False-False-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-False-False-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-False-True-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-False-True-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-False-True-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-False-True-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-True-False-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-True-False-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-True-False-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-True-False-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-True-True-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-True-True-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-True-True-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-False-True-True-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-False-False-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-False-False-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-False-False-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-False-False-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-False-True-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-False-True-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-False-True-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-False-True-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-True-False-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-True-False-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-True-False-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-True-False-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-True-True-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-True-True-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-True-True-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[False-True-True-True-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-False-False-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-False-False-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-False-False-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-False-False-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-False-True-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-False-True-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-False-True-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-False-True-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-True-False-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-True-False-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-True-False-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-True-False-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-True-True-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-True-True-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-True-True-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-False-True-True-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-False-False-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-False-False-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-False-False-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-False-False-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-False-True-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-False-True-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-False-True-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-False-True-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-True-False-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-True-False-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-True-False-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-True-False-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-True-True-False-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-True-True-False-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-True-True-True-False] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_notoken[True-True-True-True-True-True] | ||
'You must have the anaconda token defined to do token rotation!' | ||
# --- | ||
# name: test_rotate_anaconda_token_provider_error[appveyor] | ||
'Failed to rotate token for foo/bar-feedstock on appveyor!' | ||
# --- | ||
# name: test_rotate_anaconda_token_provider_error[azure] | ||
'Failed to rotate token for foo/bar-feedstock on azure!' | ||
# --- | ||
# name: test_rotate_anaconda_token_provider_error[circle] | ||
'Failed to rotate token for foo/bar-feedstock on circle!' | ||
# --- | ||
# name: test_rotate_anaconda_token_provider_error[drone] | ||
'Failed to rotate token for foo/bar-feedstock on drone endpoint https://cloud.drone.io!' | ||
# --- | ||
# name: test_rotate_anaconda_token_provider_error[github_actions] | ||
'Failed to rotate token for foo/bar-feedstock on github actions!' | ||
# --- | ||
# name: test_rotate_anaconda_token_provider_error[travis] | ||
'Failed to rotate token for foo/bar-feedstock on travis!' | ||
# --- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# serializer version: 1 | ||
# name: test_generate[CONDA_FORGE_YML] | ||
''' | ||
clone_depth: 0 | ||
recipe_dir: myrecipe | ||
skip_render: | ||
- README.md | ||
- LICENSE.txt | ||
- .gitattributes | ||
- .gitignore | ||
- build-locally.py | ||
- LICENSE | ||
- .github/CONTRIBUTING.md | ||
- .github/ISSUE_TEMPLATE.md | ||
- .github/PULL_REQUEST_TEMPLATE.md | ||
- .github/workflows | ||
''' | ||
# --- | ||
# name: test_generate[META_YML] | ||
''' | ||
{% set name = "my-package" %} | ||
{% set version = environ.get('GIT_DESCRIBE_TAG', 'untagged')|string|replace('-','_') %} | ||
{% set build_number = environ.get('GIT_DESCRIBE_NUMBER', '0') %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
git_url: {{ environ.get('FEEDSTOCK_ROOT', '..') }} | ||
|
||
build: | ||
# Uncomment the following line if the package is pure Python and the recipe | ||
# is exactly the same for all platforms. It is okay if the dependencies are | ||
# not built for all platforms/versions, although selectors are still not allowed. | ||
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#noarch-python | ||
# for more details. | ||
# noarch: python | ||
|
||
number: {{ build_number }} | ||
string: {{ [build_number, ('h' + PKG_HASH), environ.get('GIT_DESCRIBE_HASH', '')]|join('_') }} | ||
|
||
# If the installation is complex, or different between Unix and Windows, | ||
# use separate bld.bat and build.sh files instead of this key. By default, | ||
# the package will be built for the Python versions supported by conda-forge | ||
# and for all major OSs. Add the line "skip: True # [py<35]" (for example) | ||
# to limit to Python 3.5 and newer, or "skip: True # [not win]" to limit | ||
# to Windows. | ||
script: "{{ PYTHON }} -m pip install . -vv" | ||
|
||
requirements: | ||
build: | ||
# If your project compiles code (such as a C extension) then add the required | ||
# compilers as separate entries here. Compilers are named 'c', 'cxx' and 'fortran'. | ||
- {{ compiler('c') }} | ||
host: | ||
- python | ||
- pip | ||
run: | ||
- python | ||
|
||
test: | ||
# Some packages might need a `test/commands` key to check CLI. | ||
# List all the packages/modules that `run_test.py` imports. | ||
imports: | ||
- my_package | ||
# Run your test commands here | ||
commands: | ||
- my-package --help | ||
- pytest | ||
# declare any test-only requirements here | ||
requires: | ||
- pytest | ||
# copy over any needed test files here | ||
source_files: | ||
- tests/ | ||
|
||
# Uncomment and fill in my-package metadata | ||
#about: | ||
# home: https://github.com/conda-forge/conda-smithy | ||
# license: BSD-3-Clause | ||
# license_family: BSD | ||
# license_file: LICENSE | ||
|
||
# Uncomment the following if this will be on a forge | ||
# Remove these lines if this is only be used for CI | ||
#extra: | ||
# recipe-maintainers: | ||
# - BobaFett | ||
# - LisaSimpson | ||
''' | ||
# --- | ||
# name: test_generate[gitignore] | ||
''' | ||
# conda smithy ci-skeleton start | ||
*.pyc | ||
build_artifacts | ||
# conda smithy ci-skeleton end | ||
|
||
''' | ||
# --- |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
mock
is not needed anymore