Skip to content

Commit

Permalink
Merge pull request #277 from anaconda/skip-integration
Browse files Browse the repository at this point in the history
Skip the tests that only work with the testbed
  • Loading branch information
mcg1969 authored Nov 4, 2024
2 parents 1fc3e8e + 9441d2a commit 48aed9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
run: |
source $CONDA/etc/profile.d/conda.sh
conda install conda conda-build --yes
conda build --no-test conda-recipe
conda build conda-recipe
mv $CONDA/conda-bld .
- name: Upload the build artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
Expand Down
3 changes: 2 additions & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ test:
commands:
- pip check
- python -m nb_conda_kernels list
- python -m pytest -v --cov=nb_conda_kernels tests
# Skips any tests that assume the existence of the testbed
- python -m pytest -v -m "not testbed" --cov=nb_conda_kernels tests

about:
home: https://github.com/Anaconda-Platform/nb_conda_kernels
Expand Down
2 changes: 2 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def print(x):
sys.stdout.flush()


@pytest.mark.testbed
def test_configuration():
print('\nConda configuration')
print('-------------------')
Expand Down Expand Up @@ -169,6 +170,7 @@ def test_kernelspec_path(tmp_path, kernelspec_path, user, prefix, expected):
assert call_[1]["prefix"] ==prefix


@pytest.mark.testbed
@pytest.mark.parametrize("kernelspec_path", ["", None])
def test_install_kernelspec(tmp_path, kernelspec_path):
config = Config({"CondaKernelSpecManager": {"kernelspec_path": kernelspec_path}})
Expand Down

0 comments on commit 48aed9d

Please sign in to comment.