Skip to main content

Assert files in test automation

Project description

Assert-files

This lib is a support assert to validate files content (txt, csv, pdf, docx, xlsx and etc.).

Features

  • Implemented
    • PDF
      • Form Comparing
  • Not Implemente
    • PDF *All text comparing
    • TXT
    • CSV
    • DOCX
    • XLSX

Installation

Follow lib instructions on https://pypi.org/project/assert-files/

pip install assert-files

How to use

You are able to use assert_file.file.File object or just provide the path of local file

from assert_files.assert_files import assert_objects
from assert_files.file import File

fields = ['field1', 'field2']
assert_objects(
    File(filepath='./tests/files/test_main.pdf'), 
    File(filepath='./tests/files/test_main_copy.pdf'), 
    fields=fields
)
from assert_files.assert_files import assert_files_by_path

fields = ['field1', 'field2']
assert_files_by_path(
    './tests/files/test_main.pdf', 
    './tests/files/test_main_copy.pdf', 
    fields=fields
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

assert-files-0.1.3.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

assert_files-0.1.3-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page