Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tests outside of the Python package to top level #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
graft tests
include README.rst
include LICENSE
prune htmlmin/tests
include tox.ini
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
download_url='https://github.com/mankyd/htmlmin',
author='Dave Mankoff',
author_email='[email protected]',
packages=find_packages(),
packages=find_packages(exclude=["tests"]),
include_package_data=True,
zip_safe=True,
test_suite='htmlmin.tests.tests.suite',
test_suite='tests.tests.suite',
install_requires=[],
tests_require=[],
classifiers=[
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions htmlmin/tests/tests.py → tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,14 @@ class TestMinifyFunction(HTMLMinTestCase):

def test_basic_minification_quality(self):
import codecs
with codecs.open('htmlmin/tests/large_test.html', encoding='utf-8') as inpf:
with codecs.open('tests/large_test.html', encoding='utf-8') as inpf:
inp = inpf.read()
out = self.minify(inp)
self.assertEqual(len(inp) - len(out), 9408)

def test_high_minification_quality(self):
import codecs
with codecs.open('htmlmin/tests/large_test.html', encoding='utf-8') as inpf:
with codecs.open('tests/large_test.html', encoding='utf-8') as inpf:
inp = inpf.read()
out = self.minify(inp, remove_all_empty_space=True, remove_comments=True)
self.assertEqual(len(inp) - len(out), 12518)
Expand Down