File: test_psychology.py

package info (click to toggle)
python3-proselint 0.14.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,220 kB
  • sloc: python: 7,173; sh: 6; makefile: 3
file content (37 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""Tests for psychology.misc check."""

from proselint.checks.psychology import misc as chk

from .check import Check


class TestCheck(Check):
    """The test class for psychology.misc."""

    __test__ = True

    @property
    def this_check(self):
        """Boilerplate."""
        return chk

    def test_smoke_lie_detector_test(self):
        """Basic smoke test for psychology.misc.check_lie_detector_test."""
        assert chk.check_lie_detector_test(
            """Smoke phrase with nothing flagged.""") == []
        assert chk.check_lie_detector_test(
            """The defendant took a lie detector test.""") != []

    def test_smoke_p_equals_zero(self):
        """Basic smoke test for psychology.misc.check_p_equals_zero."""
        assert chk.check_p_equals_zero(
            """Smoke phrase with nothing flagged.""") == []
        assert chk.check_p_equals_zero(
            """The effect was highly signficant at p = 0.00.""") != []

    def test_smoke_mental_telepathy(self):
        """Basic smoke test for psychology.misc.check_mental_telepathy."""
        assert chk.check_mental_telepathy(
            """Smoke phrase with nothing flagged.""") == []
        assert chk.check_mental_telepathy(
            """I've been practicing mental telepathy.""") != []