Skip to content

Increase pytest coverage#285

Open
aliceinwire wants to merge 1 commit into
kernelci:mainfrom
aliceinwire:pytest
Open

Increase pytest coverage#285
aliceinwire wants to merge 1 commit into
kernelci:mainfrom
aliceinwire:pytest

Conversation

@aliceinwire

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Arisu Tachibana <arisu.tachibana@miraclelinux.com>
load_toml("missing.toml", "checkout")


def test_config_command_creates_private_example_file(tmp_path):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably isolate this to HOME. I.e. when I tested this locally I got "Config file already present", since its already there. I see you use HOME on test_load_toml_missing_required_config_aborts, so probably we should here too?


def test_commit_find_diff_returns_latest_patch(tmp_path):
repo = subprocess.run(
["git", "init", str(tmp_path)], check=True, capture_output=True, text=True

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subprocess.run(["git", "init", "-b", "master", str(tmp_path)], ...)

I would force master here, because later down you use master, and there is no enforcement, so its a edge case if it ever creates a repo on main instead of master.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants