Skip to content

Commit

Permalink
move test -> tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Feb 26, 2019
1 parent 40e5cc2 commit 7bb892b
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ENV/
# vim
*.swp
.pytest_cache
test/assets
tests/assets
repo
.pynative
_*.png
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ docker:
.PHONY: test
# Run test
test:
$(PYTHON) -m pytest test
$(PYTHON) -m pytest tests

#
# Assets
Expand All @@ -62,5 +62,5 @@ repo/assets:

# Setup test assets
assets: repo/assets
mkdir -p test/assets
cp -r -t test/assets repo/assets/data/*
mkdir -p tests/assets
cp -r -t tests/assets repo/assets/data/*
6 changes: 3 additions & 3 deletions ocrd_kraken/ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import io
import kraken.binarization
from ocrd import Processor
from ocrd.utils import getLogger, polygon_from_points, concat_padded
from ocrd.model.ocrd_page import from_file
from ocrd_utils import getLogger, polygon_from_points, concat_padded
from ocrd_modelfactory import page_from_file

from ocrd_kraken.config import OCRD_TOOL

Expand All @@ -21,7 +21,7 @@ def process(self):
"""
for (n, input_file) in enumerate(self.input_files):
log.info("INPUT FILE %i / %s", n, input_file)
pcgts = from_file(self.workspace.download_file(input_file))
pcgts = page_from_file(self.workspace.download_file(input_file))
image_url = pcgts.get_Page().imageFilename
log.info("pcgts %s", pcgts)
for region in pcgts.get_Page().get_TextRegion():
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/base.py → tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
import sys
from unittest import TestCase, skip, main # pylint: disable=unused-import

from test.assets import assets
from tests.assets import assets

PWD = os.path.dirname(os.path.realpath(__file__))
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import shutil

from test.base import TestCase, assets, main
from tests.base import TestCase, assets, main

from ocrd import Resolver
from ocrd_kraken.binarize import KrakenBinarize
Expand Down
2 changes: 1 addition & 1 deletion test/test_kraken_ocr.py → tests/test_kraken_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import shutil

from test.base import TestCase, assets, main
from tests.base import TestCase, assets, main

from ocrd.resolver import Resolver
from ocrd import run_processor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import shutil

from test.base import TestCase, assets, main
from tests.base import TestCase, assets, main

from ocrd.resolver import Resolver
from ocrd_kraken.segment import KrakenSegment
Expand Down

0 comments on commit 7bb892b

Please sign in to comment.