Skip to content

Commit f6ee5ff

Browse files
committed
Merge branch 'issue1'
2 parents b02f275 + b53c1e1 commit f6ee5ff

5 files changed

Lines changed: 9 additions & 44 deletions

File tree

tests/test_tinytex_1.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/test_tinytex_2.py

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
import pytest
55

6-
from .utils import download_tinytex_0
6+
from .utils import download_tinytex
77

8-
def test_successful_download(download_tinytex_0):
8+
def test_successful_download(download_tinytex):
99
assert os.path.isdir(os.path.join("tests", "tinytex_distribution"))
1010

11-
def test_bin_is_in_distribution(download_tinytex_0):
11+
def test_bin_is_in_distribution(download_tinytex):
1212
assert os.path.isdir(os.path.join("tests", "tinytex_distribution", "bin"))
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import os
22
import pytest
33

4-
from .utils import download_tinytex_0
4+
from .utils import download_tinytex
55

66
import pytinytex
77

8-
def test_empty_cache(download_tinytex_0):
8+
def test_empty_cache(download_tinytex):
99
assert pytinytex.__tinytex_path is None
1010

11-
def test_failing_resolver(download_tinytex_0):
11+
def test_failing_resolver(download_tinytex):
1212
assert pytinytex.__tinytex_path is None
1313
with pytest.raises(RuntimeError):
1414
pytinytex._resolve_path("failing")
@@ -17,13 +17,13 @@ def test_failing_resolver(download_tinytex_0):
1717
pytinytex.ensure_tinytex_installed("failing")
1818
assert pytinytex.__tinytex_path is None
1919

20-
def test_successful_resolver(download_tinytex_0):
20+
def test_successful_resolver(download_tinytex):
2121
assert pytinytex.__tinytex_path is None
2222
pytinytex.ensure_tinytex_installed("tests")
2323
assert isinstance(pytinytex.__tinytex_path, str)
2424
assert os.path.isdir(pytinytex.__tinytex_path)
2525

26-
def test_get_tinytex_path(download_tinytex_0):
26+
def test_get_tinytex_path(download_tinytex):
2727
pytinytex.ensure_tinytex_installed("tests")
2828
assert isinstance(pytinytex.get_tinytex_path(), str)
2929
assert pytinytex.__tinytex_path == pytinytex.get_tinytex_path("tests")

tests/utils.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,11 @@
66
import pytinytex
77

88
@pytest.fixture(scope="module")
9-
def download_tinytex_0():
9+
def download_tinytex():
1010
yield pytinytex.download_tinytex(variation=0, target_folder=os.path.join("tests", "tinytex_distribution"), download_folder="tests")
1111
cleanup()
1212

1313

14-
@pytest.fixture(scope="module")
15-
def download_tinytex_1():
16-
yield pytinytex.download_tinytex(variation=1, target_folder=os.path.join("tests", "tinytex_distribution"), download_folder="tests")
17-
cleanup()
18-
19-
@pytest.fixture(scope="module")
20-
def download_tinytex_2():
21-
yield pytinytex.download_tinytex(variation=2, target_folder=os.path.join("tests", "tinytex_distribution"), download_folder="tests")
22-
cleanup()
23-
24-
2514
def cleanup():
2615
shutil.rmtree(os.path.join("tests", "tinytex_distribution"))
2716
for item in os.listdir("tests"):

0 commit comments

Comments
 (0)