Skip to content

Commit

Permalink
minimum viable version
Browse files Browse the repository at this point in the history
  • Loading branch information
adbar committed Apr 8, 2019
1 parent 8ece7fb commit ab5b682
Show file tree
Hide file tree
Showing 6 changed files with 1,039 additions and 24 deletions.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ def readme():
packages=packages,
include_package_data=True,
install_requires=[
'ftfy',
'justext',
'langid',
'lru-dict',
'lxml == 4.3.0', # CPython parser issue with version 4.3.1
# 'requests >= 2.19.0',
],
Expand Down
321 changes: 321 additions & 0 deletions tests/cache/die-partei.net.sh.html

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions tests/unit_tests.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
Unit tests for the htmldate library.
Unit tests for the textract library.
"""

import logging
Expand All @@ -14,9 +14,9 @@


MOCK_PAGES = { \
'http://blog.python.org/2016/12/python-360-is-now-available.html': 'blog.python.org.html', \
'https://die-partei.net/sh/': 'die-partei.net.sh.html', \
}
#
# '': '', \


TEST_DIR = os.path.abspath(os.path.dirname(__file__))
Expand All @@ -27,6 +27,10 @@ def load_mock_page(url):
htmlstring = inputf.read()
return htmlstring

def test_main():
'''test extraction from HTML'''
assert textract.process_record(load_mock_page('https://die-partei.net/sh/'), 'https://die-partei.net/sh/', '0000') is not None


if __name__ == '__main__':
load_mock_page()
test_main()
1 change: 1 addition & 0 deletions textract/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

## imports
from .core import *
from .settings import *

## logging best practices
# http://docs.python-guide.org/en/latest/writing/logging/
Expand Down
Loading

0 comments on commit ab5b682

Please sign in to comment.