Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Baji committed Jul 10, 2024
1 parent e6545bb commit 9cb1fa1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/test_command_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from json import dumps, loads
from pytest import fixture
from discordai.template import list_commands
from discordai_modelizer.customize import create_model
from .conftest import TEST_COG_PATH, TEST_COMMAND_NAME
from . import expected_values

Expand All @@ -21,16 +20,12 @@


@fixture(scope="function")
def default_file_output():
# Ensure a clean start by removing any existing files
def clean_file_output():
if FULL_LOGS_PATH.exists():
FULL_LOGS_PATH.unlink()
if FULL_DATASET_PATH.exists():
FULL_DATASET_PATH.unlink()
# Generate log and dataset files
create_model(CHANNEL_ID, USER)
yield
# Cleanup after the tests in this module
if FULL_LOGS_PATH.exists():
FULL_LOGS_PATH.unlink()
if FULL_DATASET_PATH.exists():
Expand Down Expand Up @@ -61,7 +56,7 @@ def test_cli_model_list(script_runner, init_config):
assert o in loads(cli.stdout)


def test_cli_training(script_runner, default_file_output, init_config):
def test_cli_training(script_runner, clean_file_output, init_config):
cli = script_runner.run(
[
"discordai",
Expand Down

0 comments on commit 9cb1fa1

Please sign in to comment.