"""Tests the linting of human-specific tags"""

import npc
import pytest
import os
import functools
from tests.util import fixture_dir

lint_strict = functools.partial(npc.linters.human.lint, strict=True)

def test_requires_path():
    character = npc.Character()
    problems = npc.linters.human.lint(character)
    assert 'Missing path' in problems

class TestStrictHumanLinting:
    def test_has_virtue(self):
        char_file = fixture_dir('linter', 'human', 'Has Virtue.nwod')
        character = npc.parser.parse_character(char_file)
        problems = lint_strict(character)
        assert 'Missing virtue' not in problems

    def test_missing_virtue(self):
        char_file = fixture_dir('linter', 'human', 'Gotta Nada.nwod')
        character = npc.parser.parse_character(char_file)
        problems = lint_strict(character)
        assert 'Missing virtue' in problems

    def test_has_vice(self):
        char_file = fixture_dir('linter', 'human', 'Has Vice.nwod')
        character = npc.parser.parse_character(char_file)
        problems = lint_strict(character)
        assert 'Missing vice' not in problems

    def test_missing_vice(self):
        char_file = fixture_dir('linter', 'human', 'Gotta Nada.nwod')
        character = npc.parser.parse_character(char_file)
        problems = lint_strict(character)
        assert 'Missing vice' in problems

@@ -133,78 +133,8 @@
 ir%0A%0A
-lint_strict = functools.partial(npc.linters.human.lint, strict=True)%0A%0A
 def 
@@ -289,27 +289,195 @@
 Test
-StrictHumanLinting:
+ViceAndVirtue:%0A    @pytest.mark.parametrize(%22strict,is_problem%22, %5B%0A                             (True, False),%0A                             (False, False),%0A                             %5D)
 %0A   
@@ -493,32 +493,59 @@
 _has_virtue(self
+, prefs, strict, is_problem
 ):%0A        char_
@@ -678,37 +678,63 @@
 blems = 
-lint_strict(character
+npc.linters.human.lint(character, strict=strict
 )%0A      
@@ -734,32 +734,33 @@
 %0A        assert 
+(
 'Missing virtue'
@@ -760,32 +760,215 @@
 virtue' 
-not in problems%0A
+in problems) == is_problem%0A%0A    @pytest.mark.parametrize(%22strict,is_problem%22, %5B%0A                             (True, True),%0A                             (False, False),%0A                             %5D)
 %0A    def
@@ -988,24 +988,51 @@
 _virtue(self
+, prefs, strict, is_problem
 ):%0A        c
@@ -1169,37 +1169,63 @@
 blems = 
-lint_strict(character
+npc.linters.human.lint(character, strict=strict
 )%0A      
@@ -1225,32 +1225,33 @@
 %0A        assert 
+(
 'Missing virtue'
@@ -1266,36 +1266,251 @@
 lems
-%0A%0A    def test_has_vice(self
+) == is_problem%0A%0A    @pytest.mark.parametrize(%22strict,is_problem%22, %5B%0A                             (True, False),%0A                             (False, False),%0A                             %5D)%0A    def test_has_vice(self, prefs, strict, is_problem
 ):%0A 
@@ -1653,37 +1653,63 @@
 blems = 
-lint_strict(character
+npc.linters.human.lint(character, strict=strict
 )%0A      
@@ -1709,32 +1709,33 @@
 %0A        assert 
+(
 'Missing vice' n
@@ -1737,24 +1737,207 @@
 ce' 
-not in problems%0A
+in problems) == is_problem%0A%0A    @pytest.mark.parametrize(%22strict,is_problem%22, %5B%0A                             (True, True),%0A                             (False, False),%0A                             %5D)
 %0A   
@@ -1963,16 +1963,43 @@
 ice(self
+, prefs, strict, is_problem
 ):%0A     
@@ -2144,29 +2144,55 @@
 s = 
-lint_strict(character
+npc.linters.human.lint(character, strict=strict
 )%0A  
@@ -2196,32 +2196,33 @@
 %0A        assert 
+(
 'Missing vice' i
@@ -2219,21 +2219,36 @@
 ng vice' in problems
+) == is_problem
 %0A

Expand human vice and virtue tests