Skip to content

Commit

Permalink
Buat direktori baru untuk fixture tes
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage committed Mar 16, 2020
1 parent 777770e commit 323aed9
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 85 deletions.
74 changes: 1 addition & 73 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,73 +1 @@
import pytest

from kbbi import KBBI


@pytest.fixture(scope="session")
def bin():
return KBBI("bin")


@pytest.fixture(scope="session")
def quo_vadis():
return KBBI("quo vadis?")


@pytest.fixture(scope="session")
def civitas_academica():
return KBBI("civitas academica")


@pytest.fixture(scope="session")
def khayal():
return KBBI("khayal")


@pytest.fixture(scope="session")
def semakin():
return KBBI("semakin")


@pytest.fixture(scope="session")
def makin():
return KBBI("makin")


@pytest.fixture(scope="session")
def keratabasa():
return KBBI("keratabasa")


@pytest.fixture(scope="session")
def tampak():
return KBBI("tampak")


@pytest.fixture(scope="session")
def menjadikan():
return KBBI("menjadikan")


@pytest.fixture(scope="session")
def lampir():
return KBBI("lampir")


@pytest.fixture(scope="session")
def kan():
return KBBI("kan")


@pytest.fixture(scope="session")
def me_():
return KBBI("me-")


@pytest.fixture(scope="session")
def _kan():
return KBBI("-kan")


@pytest.fixture(scope="session")
def _lah():
return KBBI("-lah")
from .fixtures import * # NOQA
1 change: 1 addition & 0 deletions tests/fixtures/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .kbbi import * # NOQA
73 changes: 73 additions & 0 deletions tests/fixtures/kbbi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import pytest

from kbbi import KBBI


@pytest.fixture(scope="session")
def bin():
return KBBI("bin")


@pytest.fixture(scope="session")
def quo_vadis():
return KBBI("quo vadis?")


@pytest.fixture(scope="session")
def civitas_academica():
return KBBI("civitas academica")


@pytest.fixture(scope="session")
def khayal():
return KBBI("khayal")


@pytest.fixture(scope="session")
def semakin():
return KBBI("semakin")


@pytest.fixture(scope="session")
def makin():
return KBBI("makin")


@pytest.fixture(scope="session")
def keratabasa():
return KBBI("keratabasa")


@pytest.fixture(scope="session")
def tampak():
return KBBI("tampak")


@pytest.fixture(scope="session")
def menjadikan():
return KBBI("menjadikan")


@pytest.fixture(scope="session")
def lampir():
return KBBI("lampir")


@pytest.fixture(scope="session")
def kan():
return KBBI("kan")


@pytest.fixture(scope="session")
def awalan_me():
return KBBI("me-")


@pytest.fixture(scope="session")
def akhiran_kan():
return KBBI("-kan")


@pytest.fixture(scope="session")
def terikat_lah():
return KBBI("-lah")
14 changes: 7 additions & 7 deletions tests/test_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_menjadikan(menjadikan):
assert str(menjadikan) == result


def test_lampir(lampir):
def test_prakategorial_lampir(lampir):
result = (
"lam.pir\n"
"(prakategorial) cari: lampiran, melampiri, melampirkan, terlampir"
Expand Down Expand Up @@ -125,7 +125,7 @@ def test_kan(kan):
assert str(kan) == result


def test_me_(me_):
def test_awalan_me(awalan_me):
result = (
"me- /mê-/\n"
"→ meng-\n"
Expand All @@ -143,22 +143,22 @@ def test_me_(me_):
"9. (prefiks pembentuk verba) membuat; menghasilkan: menyambal; menggulai; membatik\n"
"10. (prefiks pembentuk verba) menyatakan: mengaku"
)
assert str(me_) == result
assert str(awalan_me) == result


def test__kan(_kan):
def test_akhiran_kan(akhiran_kan):
result = (
"-kan [5]\n"
"1. (sufiks pembentuk verba) menjadikan: jalankan; datangkan; hitamkan\n"
"2. (sufiks pembentuk verba) sungguh-sungguh: dengarkan; camkan\n"
"3. (sufiks pembentuk verba) untuk; kepada orang lain: sewakan; bacakan"
)
assert str(_kan) == result
assert str(akhiran_kan) == result


def test__lah(_lah):
def test_terikat_lah(terikat_lah):
result = (
"-lah [1]\n"
"(bentuk terikat) yang digunakan untuk menekankan makna kata yang di depannya"
)
assert str(_lah) == result
assert str(terikat_lah) == result
10 changes: 5 additions & 5 deletions tests/test_str_tanpa_contoh.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_menjadikan(menjadikan):
assert str(menjadikan) == result


def test_lampir(lampir):
def test_prakategorial_lampir(lampir):
result = (
"lam.pir\n"
"(prakategorial) cari: lampiran, melampiri, melampirkan, terlampir"
Expand Down Expand Up @@ -92,7 +92,7 @@ def test_kan(kan):
assert str(kan) == result


def test_me_(me_):
def test_awalan_me(awalan_me):
result = (
"me- /mê-/\n"
"→ meng-\n"
Expand All @@ -110,14 +110,14 @@ def test_me_(me_):
"9. (prefiks pembentuk verba) membuat; menghasilkan\n"
"10. (prefiks pembentuk verba) menyatakan"
)
assert str(me_) == result
assert str(awalan_me) == result


def test__kan(_kan):
def test_akhiran_kan(akhiran_kan):
result = (
"-kan [5]\n"
"1. (sufiks pembentuk verba) menjadikan\n"
"2. (sufiks pembentuk verba) sungguh-sungguh\n"
"3. (sufiks pembentuk verba) untuk; kepada orang lain"
)
assert str(_kan) == result
assert str(akhiran_kan) == result

0 comments on commit 323aed9

Please sign in to comment.