File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ include LICENSE
33include tesserocr/*.pyx
44include tesserocr/*.pxd
55include tesserocr/*.pyi
6- include tests/*.py tests/*.png
6+ include tests/*.py tests/*.png tests/*.train
77exclude tesserocr/*.cpp
88exclude tesserocr/*.so
99exclude *.so
Original file line number Diff line number Diff line change 1+ disable_character_fragments T
2+ file_type .bl
3+ textord_fast_pitch_test T
4+ tessedit_zero_rejection T
5+ tessedit_minimal_rejection F
6+ tessedit_write_rep_codes F
7+ edges_children_fix F
8+ edges_childarea 0.65
9+ edges_boxarea 0.9
10+ tessedit_resegment_from_boxes T
11+ tessedit_train_from_boxes T
12+ textord_no_rejects T
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ def version_to_int(version):
4848class TestTessBaseApi (unittest .TestCase ):
4949
5050 _test_dir = os .path .abspath (os .path .dirname (__file__ ))
51+ _config_file = os .path .join (_test_dir , "box.train" )
5152 _image_file = os .path .join (_test_dir , "eurotext.png" )
5253
5354 def setUp (self ):
@@ -77,13 +78,13 @@ def test_init_full(self):
7778 self .assertEqual (self ._api .GetVariableAsString ("file_type" ), ".tif" )
7879 self .assertEqual (self ._api .GetVariableAsString ("edges_childarea" ), "0.5" )
7980 # use box.train config variables
80- configs = ["box.train" ]
81+ configs = [self . _config_file ]
8182 # change edges_childarea
8283 vars_ = {"edges_childarea" : "0.7" }
8384 self ._api .End ()
8485 self ._api .InitFull (configs = configs , variables = vars_ )
8586 # assert file_type from box.train and custom edges_childarea
86- self .assertEqual (self ._api .GetVariableAsString ("file_type" ), ".tif " )
87+ self .assertEqual (self ._api .GetVariableAsString ("file_type" ), ".bl " )
8788 self .assertEqual (self ._api .GetVariableAsString ("edges_childarea" ), "0.7" )
8889 # reset back to default
8990 self ._api .End ()
You can’t perform that action at this time.
0 commit comments