1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2026-01-28 01:21:40 +00:00
Files
send2trash/tests/test_script_main.py
Yaofei Zheng ad0f2af984 python2 removal: more clean up (#107)
1. remove from __future__ as those feature is mandatory >= 3.0 and we are in the future
2. python3 script defaults to UTF-8
2026-01-27 00:57:55 -06:00

16 lines
363 B
Python

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