import pytest
from seqeval.reporters import DictReporter


@pytest.mark.parametrize(
    'rows, expected',
    [
        ([], {}),
        (
            [['PERSON', 0.82, 0.79, 0.81, 24]],
            {
                'PERSON': {
                    'precision': 0.82,
                    'recall': 0.79,
                    'f1-score': 0.81,
                    'support': 24
                }
            }
        )
    ]
)
def test_dict_reporter_output(rows, expected):
    reporter = DictReporter()
    for row in rows:
        reporter.write(*row)
    assert reporter.report() == expected

@@ -53,11 +53,196 @@
 rter
-%0A%0A%0A
+, StringReporter%0A%0A%0Aclass TestDictReporter:%0A%0A    def test_write_empty(self):%0A        reporter = DictReporter()%0A        reporter.write_blank()%0A        assert reporter.report_dict == %7B%7D%0A%0A    
 @pyt
@@ -263,16 +263,20 @@
 etrize(%0A
+    
     'row
@@ -297,10 +297,18 @@
     
+ 
-%5B%0A
+   %5B%0A    
     
@@ -329,18 +329,26 @@
         
+ 
-(%0A
+   (%0A    
         
@@ -399,18 +399,26 @@
         
-%7B%0A
+    %7B%0A    
         
@@ -457,16 +457,20 @@
         
+  
+  
 'precisi
@@ -500,16 +500,20 @@
         
+    
 'recall'
@@ -540,16 +540,20 @@
         
+  
+  
 'f1-scor
@@ -582,16 +582,20 @@
         
+    
 'support
@@ -608,34 +608,42 @@
                 
+  
-%7D%0A
+  %7D%0A    
             %7D%0A  
@@ -652,18 +652,34 @@
     
+  
+  )%0A        %5D%0A    
 )%0A    
-%5D%0A)%0A
 def 
@@ -704,16 +704,22 @@
 _output(
+self, 
 rows, ex
@@ -727,16 +727,20 @@
 ected):%0A
+    
     repo
@@ -757,24 +757,28 @@
 tReporter()%0A
+    
     for row 
@@ -786,16 +786,20 @@
 n rows:%0A
+    
         
@@ -819,24 +819,28 @@
 e(*row)%0A    
+ 
+   
 assert repor
@@ -864,8 +864,785 @@
 xpected%0A
+%0A%0Aclass TestStringReporter:%0A%0A    def test_write_empty(self):%0A        reporter = StringReporter()%0A        reporter.write_blank()%0A        assert reporter.buffer == %5B''%5D%0A%0A    def test_write_header(self):%0A        reporter = StringReporter()%0A        report = reporter.write_header()%0A        assert 'precision' in report%0A        assert 'recall' in report%0A        assert 'f1-score' in report%0A        assert 'support' in report%0A%0A    def test_write(self):%0A        reporter = StringReporter()%0A        reporter.write('XXX', 0, 0, 0, 0)%0A        assert 'XXX' in reporter.buffer%5B0%5D%0A%0A    def test_report(self):%0A        reporter = StringReporter()%0A        reporter.write('XXX', 0, 0, 0, 0)%0A        report = reporter.report()%0A        assert 'XXX' in report%0A        assert 'precision' in report%0A

Add test cases for reporters.py