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

Tests for core and cli modules #149

Merged
merged 80 commits into from
Nov 5, 2021
Merged
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
fb8f90e
add two tests for core utils
strickvl Oct 26, 2021
9b19fec
Switch customise to customize [American]
strickvl Oct 26, 2021
5622c18
remove empty test file in wrong location
strickvl Oct 26, 2021
2077753
change spelling of customise -> customize
strickvl Oct 26, 2021
4bdd0fb
add test for component_factory
strickvl Oct 26, 2021
1dde009
add extra assertion for component_fact tests
strickvl Oct 26, 2021
cacce40
add cli base test
strickvl Oct 26, 2021
a66031a
refactor base test
strickvl Oct 27, 2021
d275b93
remove empty return docstring
strickvl Oct 27, 2021
09c88f7
undo renaming of customise_sources
strickvl Oct 27, 2021
eb8243b
add stubs for tests
strickvl Oct 27, 2021
bf4813f
add implementation todo
strickvl Oct 27, 2021
06cb86a
add stub tests for config
strickvl Oct 27, 2021
5d470ed
remove doublequoted comments
strickvl Oct 27, 2021
ea1d018
add stub tests for pipeline CLI
strickvl Oct 27, 2021
3084794
add stub tests for stack
strickvl Oct 27, 2021
534fba9
add stub tests for pipeline
strickvl Oct 27, 2021
1be061c
fix typo
strickvl Oct 27, 2021
3bc2dbe
add stub tests for cli utils
strickvl Oct 27, 2021
07c8f2d
Merge remote-tracking branch 'origin/main' into alex/ENG-44-tests-cor…
strickvl Oct 27, 2021
6a80726
add version test stubs
strickvl Oct 27, 2021
c729f33
merge origin/main
strickvl Oct 28, 2021
bc3a2ba
add more tests for example CLI
strickvl Oct 28, 2021
12a6222
remove testing for deleted version module
strickvl Oct 28, 2021
6c09eee
fix failing utils test
strickvl Oct 28, 2021
8b2e49b
add tests checking return of callable
strickvl Oct 28, 2021
884515a
add test for cli version
strickvl Oct 28, 2021
353f45c
Implement test for CLI group
strickvl Oct 28, 2021
7a2e28d
add test of metadata listing
strickvl Oct 28, 2021
13d933d
add better test for info
strickvl Oct 28, 2021
8132fb3
add new test
strickvl Oct 28, 2021
9b74e58
add possible refactorings for these config tests
strickvl Oct 28, 2021
d227163
test formatting of times and dates
strickvl Oct 28, 2021
118b586
add testing for parse_unknown_options function
strickvl Oct 28, 2021
4ffe771
fix typo in docstring
strickvl Oct 28, 2021
f538878
Add test
strickvl Oct 28, 2021
33398db
add another mapping_utils test
strickvl Oct 28, 2021
e2f336a
Fix failing test and remove comments
strickvl Oct 29, 2021
d431e3e
refactor imports
strickvl Oct 29, 2021
e59b41f
add type annotations to tests
strickvl Oct 29, 2021
2df978b
fix non-testing test
strickvl Oct 29, 2021
90ca98a
add two tests for core-repo
strickvl Oct 29, 2021
4057a93
add test checking local service is spun up
strickvl Oct 29, 2021
363d6b1
fix failing test
strickvl Oct 29, 2021
4b79a34
add test for initialization
strickvl Oct 29, 2021
bc17e5b
add test for creation of zen folder
strickvl Oct 29, 2021
274da2b
remove old tests relating to datasources
strickvl Oct 29, 2021
d2f5e54
fix failing test
strickvl Oct 29, 2021
9d84226
fix typo in gitwrapper class docstring
strickvl Oct 29, 2021
184e624
add test for get_git_wrapper
strickvl Oct 29, 2021
7e32ae3
add test to get active service
strickvl Oct 29, 2021
1aa4954
add several tests for core-repo
strickvl Oct 29, 2021
8e907ef
fix typo in local_service test
strickvl Oct 29, 2021
e2c44a8
add tests for local_service
strickvl Oct 29, 2021
1e72710
add testing for local_service
strickvl Oct 29, 2021
5df8a9d
add local_service tests
strickvl Oct 29, 2021
3d70ec9
Add test to check exception is raised
strickvl Oct 29, 2021
e18aee1
add artifact store tests
strickvl Oct 29, 2021
423d068
add CRUD tests for artifact store
strickvl Oct 29, 2021
2e7a9c8
add metadata store CRUD tests
strickvl Oct 29, 2021
7393d7e
add local_service tests
strickvl Nov 1, 2021
0a1c754
fix broken test
strickvl Nov 1, 2021
c3064b6
fix failing test
strickvl Nov 1, 2021
4b4dbcd
Merge remote-tracking branch 'origin/main' into alex/ENG-44-tests-cor…
strickvl Nov 4, 2021
6112000
clean up test comments
strickvl Nov 4, 2021
d68649a
add extra test for exception in cli base
strickvl Nov 4, 2021
e86cbc8
add test for dict content
strickvl Nov 4, 2021
164b273
add tests to check readme content
strickvl Nov 4, 2021
de1e18c
reword docstring
strickvl Nov 4, 2021
cf01120
add specific exception
strickvl Nov 4, 2021
51602c8
add specific exception
strickvl Nov 4, 2021
1c4915f
add specific exceptions
strickvl Nov 4, 2021
10f17aa
add todo for future refactor
strickvl Nov 4, 2021
48b9d20
refactor readme test and add markdown parser
strickvl Nov 4, 2021
4c63ab8
add extra test for new functionality
strickvl Nov 4, 2021
415acff
remove rich.markdown functionality
strickvl Nov 4, 2021
eb94030
remove the markdown parser completely
strickvl Nov 4, 2021
8ca413f
add warning message about redownload
strickvl Nov 5, 2021
f850ab9
Merge remote-tracking branch 'origin/main' into alex/ENG-44-tests-cor…
strickvl Nov 5, 2021
6d43400
fix broken tests around new metadata.py
strickvl Nov 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix failing test and remove comments
  • Loading branch information
strickvl committed Oct 29, 2021
commit e2f336ab527a1d2bea1d556c9fae06463400c97a
15 changes: 4 additions & 11 deletions tests/cli/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
import os
from pathlib import Path

import pytest
from click.testing import CliRunner
from git import Repo
from git.exc import InvalidGitRepositoryError

from zenml.cli.base import init
from zenml.core.constants import ZENML_DIR_NAME
Expand All @@ -34,14 +32,9 @@ def test_init_creates_zen_folder(tmp_path: Path) -> None:
assert ZENML_DIR_NAME in dir_files


@pytest.mark.xfail()
def test_init_raises_error_when_repo_not_git_repo(tmp_path: Path) -> None:
"""Ensure an InvalidGitRepositoryError is raised when the given path is not a git repository"""
"""Ensure ZenML fails when the given path is not a git repository"""
runner = CliRunner()
with pytest.raises(InvalidGitRepositoryError):
zen_fake_repo_path = tmp_path / ZENML_DIR_NAME
runner.invoke(init, ["--repo_path", str(zen_fake_repo_path)])


# TODO: add test for when the repo path is already initialised as a zenml repository (check other tests existing already)
# it raises an assertion error
zen_fake_repo_path = tmp_path / ZENML_DIR_NAME
result = runner.invoke(init, ["--repo_path", str(zen_fake_repo_path)])
assert result.exit_code == 2