diff --git a/tests/conftest.py b/tests/conftest.py index b58eb80..06b00b3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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 diff --git a/tests/fixtures/__init__.py b/tests/fixtures/__init__.py new file mode 100644 index 0000000..5cf757b --- /dev/null +++ b/tests/fixtures/__init__.py @@ -0,0 +1 @@ +from .kbbi import * # NOQA diff --git a/tests/fixtures/kbbi.py b/tests/fixtures/kbbi.py new file mode 100644 index 0000000..c88058a --- /dev/null +++ b/tests/fixtures/kbbi.py @@ -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") diff --git a/tests/test_str.py b/tests/test_str.py index 339aa6d..47f93dd 100644 --- a/tests/test_str.py +++ b/tests/test_str.py @@ -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" @@ -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" @@ -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 diff --git a/tests/test_str_tanpa_contoh.py b/tests/test_str_tanpa_contoh.py index a11071f..a76fd16 100644 --- a/tests/test_str_tanpa_contoh.py +++ b/tests/test_str_tanpa_contoh.py @@ -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" @@ -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" @@ -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