mirror of
https://github.com/arsenetar/send2trash.git
synced 2026-01-22 06:37:18 +00:00
- 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
17 lines
381 B
Python
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
|