Commit 148423fd authored by Andrey Golovizin's avatar Andrey Golovizin
Browse files

Move tests outside the pybtex package

parent f4d2b8d9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ formats = gztar bztar zip
with-doctest = True

[tool:pytest]
testpaths = pybtex
testpaths = pybtex tests
addopts = --doctest-modules

[isort]
+5 −0
Original line number Diff line number Diff line
@@ -21,8 +21,13 @@ from __future__ import unicode_literals
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


import pkgutil
from difflib import unified_diff


def diff(src, dst):
    return '\n'.join(unified_diff(src.splitlines(), dst.splitlines()))


def read_file(filename, package='tests.data'):
    return pkgutil.get_data(package, filename).decode('UTF-8')
Loading