Skip to content

Commit

Permalink
[REF] tests
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Felipe Miléo <mileo@kmee.com.br>
  • Loading branch information
mileo committed Jul 16, 2024
1 parent 4f68793 commit 244298e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 54 deletions.
46 changes: 0 additions & 46 deletions .appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.5", "3.8", "3.10"]
python-version: ["3.8", "3.10"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion src/erpbrasil/edoc/pdf/danfe_formata.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def formata_dhRecbto(dhRecbto):
# FIXME em algum ponto o valor do campo esta sendo formatado para string
# deveria ter um tratamento caso o valor seja None deveria retornar a string
# vazia '' ao invés de retornar 'None'
if dhRecbto is 'None':
if dhRecbto == 'None':
return ''
else:
dhRecbto = str(dhRecbto)
Expand Down
13 changes: 7 additions & 6 deletions tests/test_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
OUTPUT = 'output'
TIPO = 'danfe'

for (dirpath, dirnames, filenames) in walk(PATH):
for file in filenames:
arquivo = path.join(PATH, file)
output = path.join(OUTPUT, file)
def test_pdf_gen():
for (dirpath, dirnames, filenames) in walk(PATH):
for file in filenames:
arquivo = path.join(PATH, file)
output = path.join(OUTPUT, file)

print('XML: ' + file)
print(base.ImprimirXml.imprimir(caminho_xml=arquivo, output_dir=output))
print('XML: ' + file)
print(base.ImprimirXml.imprimir(caminho_xml=arquivo, output_dir=output))

0 comments on commit 244298e

Please sign in to comment.