Skip to content

Commit

Permalink
test/test_kcidev: Add clean function
Browse files Browse the repository at this point in the history
Signed-off-by: Arisu Tachibana <[email protected]>
  • Loading branch information
aliceinwire committed Oct 1, 2024
1 parent fe6f996 commit 5d1b55f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_kcidev.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import os
import shutil
from subprocess import PIPE, run

import git
import pytest


def test_prepare():
# prepare enviroment
os.system("cp .kci-dev.toml.example .kci-dev.toml")
assert os.path.exists(".kci-dev.toml")

Expand Down Expand Up @@ -80,3 +82,13 @@ def test_kcidev_commit():
print("#### stderr ####")
print(result.stderr)
assert result.returncode == 1


def test_clean():
# clean enviroment
shutil.rmtree("my-new-repo/")

if os.path.isfile(".kci-dev.toml"):
os.remove(".kci-dev.toml")
else:
print("File does not exist")

0 comments on commit 5d1b55f

Please sign in to comment.