Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hedyhli committed May 24, 2023
1 parent 927cb8d commit 060e99c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from time import time
# import re
import os
import shutil

from click.testing import CliRunner
import pytest
Expand Down Expand Up @@ -232,7 +233,7 @@ def test_cached_file_existence(self):
"""Test the caching of result"""

self.cli_result(
"--topic", "python", "--topic", "java", "--stars", ">100", clear_cache=True
"--topic", "python", "--stars", ">100", clear_cache=True, nop=False
)

assert os.path.exists(CACHE_DIR), f"Cache directory not created: {CACHE_DIR}"
Expand Down Expand Up @@ -273,8 +274,8 @@ def cli_result(
"""
if clear_cache:
try:
os.remove(CACHE_DIR)
except OSError:
shutil.rmtree(CACHE_DIR)
except FileNotFoundError:
pass

runner = CliRunner()
Expand Down

0 comments on commit 060e99c

Please sign in to comment.