File: test_dateparser_data_integrity.py

package info (click to toggle)
dateparser 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,140 kB
  • sloc: python: 52,721; makefile: 155; sh: 15
file content (16 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytest

pytest.importorskip("ruamel")

from dateparser_scripts.write_complete_data import write_complete_data


def test_dateparser_data_integrity():
    files = write_complete_data(in_memory=True)

    for filename in files:
        with open(filename, "rb") as f:
            assert f.read().strip() == files[filename].strip(), (
                'The content of the file "{}" doesn\'t match the content'
                " of the generated file.".format(filename)
            )