Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniouaa committed Apr 10, 2024
1 parent c7c1d3e commit 7555ef5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import pathlib
import re

import pytest
import responses

from krypto.todo import Todo

sample_config = {
"comment": "#",
"src": "krypto",
"prefix": "TODO",
"attach-issue": False,
"include": "tests",
Expand Down
12 changes: 7 additions & 5 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@ def test_config(tmp_path):
[tool.krypto]
comment = "#"
prefix = "TODO"
src = "krypto"
include = "tests"
attach-issue = false
""".strip()
)

config = Config(pyproject)

test_config = sample_config
del test_config["dry"]
del test_config["username"]
del test_config["repository"]
test_config_dict = sample_config
del test_config_dict["dry"]
del test_config_dict["username"]
del test_config_dict["repository"]

assert config.parse() == test_config
assert config.parse() == test_config_dict


def test_config_malformed(tmp_path):
Expand All @@ -32,6 +33,7 @@ def test_config_malformed(tmp_path):
"""
[tool.kry]
prefix = "TODO"
src = "krypto"
include = "tests"
attach-issue = false
""".strip()
Expand Down
1 change: 0 additions & 1 deletion tests/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def test_request_body_no_body(sample_todo):

def test_basename():
username, repository = get_basename()
print(get_basename())

assert username == "antoniouaa"
assert repository == "krypto"
Expand Down

0 comments on commit 7555ef5

Please sign in to comment.