mirror of
https://github.com/arsenetar/send2trash.git
synced 2026-01-28 01:21:40 +00:00
1. remove from __future__ as those feature is mandatory >= 3.0 and we are in the future 2. python3 script defaults to UTF-8
16 lines
363 B
Python
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
|