no way to robustly set Windows files to readonly, so removed those tests

This commit is contained in:
Tristan Lee
2023-09-21 05:51:28 -05:00
parent 89d89521fa
commit c7f2db1f9d
4 changed files with 6 additions and 29 deletions

View File

@@ -12,4 +12,7 @@ jobs:
python-version: '3.9'
- run: pip install -e .[dev]
- run: python -m playwright install
- run: pytest --exitfirst --failed-first
- run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
pytest

View File

@@ -12,4 +12,4 @@ jobs:
python-version: '3.9'
- run: pip install -e .[dev]
- run: python -m playwright install
- run: pytest --exitfirst --failed-first
- run: pytest

View File

@@ -42,32 +42,6 @@ def test_parser(hashtags, attribute, value, flag):
assert args.get("hashtags") == hashtags
def test_output_dir_spec_noexist_nowrite(tmp_path):
# Specified nonexistent output directory without write permissions
parser = create_parser()
os.chmod(tmp_path, 0o444)
specified_output_dir = tmp_path / "test"
with pytest.raises(SystemExit) as system_exit:
result = process_output_dir(
specified_output_dir=specified_output_dir, parser=parser
)
assert system_exit.type == SystemExit
os.chmod(tmp_path, 0o666)
def test_output_dir_spec_exist_nowrite(tmp_path):
# Specified existing output directory without write permissions
parser = create_parser()
os.chmod(tmp_path, 0o444)
specified_output_dir = tmp_path
with pytest.raises(SystemExit) as system_exit:
result = process_output_dir(
specified_output_dir=specified_output_dir, parser=parser
)
assert system_exit.type == SystemExit
os.chmod(tmp_path, 0o666)
def test_output_dir_unspec_nowrite(monkeypatch, tmp_path):
# Unspecified, in current directory without write permissions
parser = create_parser()

View File

@@ -184,7 +184,7 @@ class TikTokDownloader:
)
except Exception as e:
logger.warning(
"Encountered error {e} when fetching data, retrying in headed mode"
f"Encountered error {e} when fetching data, retrying in headed mode"
)
fetched_data = asyncio.run(
_fetch_hashtag_data(hashtag=hashtag, limit=limit, headed=True)