1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2026-01-22 14:41:40 +00:00
Files
send2trash/tests/test_script_main.py
Andrew Senetar 8d96aa29df tests: Cleanup some pylint errors and share common fixture
- Cleanup some of the pylint erros in the tests
- Reorganize some of the tests functions and fixtures
- Move the one common fixture to conftest.py for sharing
2025-12-31 02:30:38 +00:00

17 lines
381 B
Python

# encoding: utf-8
from os import path as op
import pytest
from send2trash.__main__ import main as trash_main
def test_trash(test_file):
trash_main(["-v", test_file])
assert op.exists(test_file) is False
def test_no_args(test_file):
pytest.raises(SystemExit, trash_main, [])
pytest.raises(SystemExit, trash_main, ["-v"])
assert op.exists(test_file) is True