feat: move edit_note function to a separate file
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
c25156fe4c
commit
75d623a124
10 changed files with 191 additions and 42 deletions
21
tests/file_fixtures.py
Normal file
21
tests/file_fixtures.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import shutil
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def tmpfile():
|
||||
_tmpfile = NamedTemporaryFile(delete=False)
|
||||
with open(_tmpfile.name, "w") as file:
|
||||
yield file
|
||||
Path(_tmpfile.name).unlink()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def tmpdir():
|
||||
tmpdir = Path(tempfile.mkdtemp())
|
||||
yield tmpdir
|
||||
shutil.rmtree(tmpdir)
|
||||
Loading…
Add table
Add a link
Reference in a new issue