forked from PyAr/pyafipws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(windows-installer): update build process and add PyI25 COM serve…
…r tests - Update py2exe version to 0.13.0.2 in requirements-dev.txt - Simplify version handling in setup_win.py - Add PowerShell test script for PyI25 COM server automation - Implement Pester testing framework for PyI25 in CI workflow - Add step to list dist folder contents in CI workflow Signed-off-by: SONIABHISHEK121 <[email protected]>
- Loading branch information
1 parent
90ef00f
commit 9901a35
Showing
4 changed files
with
83 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Test script for PyI25 COM object | ||
|
||
# Create PyI25 COM object | ||
$PyI25 = New-Object -ComObject PyI25 | ||
|
||
Describe "PyI25 Tests" { | ||
# It "Version is not empty" { | ||
# $PyI25.Version | Should -Not -BeNullOrEmpty | ||
# } | ||
|
||
It "Can generate barcode" { | ||
$barras = "202675653930240016120303473904220110529" | ||
$barras += $PyI25.DigitoVerificadorModulo10($barras) | ||
$salida = Join-Path $PWD "barras_test.png" | ||
$result = $PyI25.GenerarImagen($barras, $salida) | ||
$result | Should -Be $true | ||
Test-Path $salida | Should -Be $true | ||
} | ||
|
||
It "Digito Verificador calculation is correct" { | ||
$barras = "202675653930240016120303473904220110529" | ||
$digito = $PyI25.DigitoVerificadorModulo10($barras) | ||
$digito | Should -Be "9" | ||
} | ||
|
||
It "Generated barcode file is valid" { | ||
$salida = Join-Path $PWD "barras_test.png" | ||
$fileInfo = Get-Item $salida | ||
$fileInfo.Length | Should -BeGreaterThan 0 | ||
} | ||
|
||
It "Can handle different input for DigitoVerificadorModulo10" { | ||
$testInput = "123456789" | ||
$digito = $PyI25.DigitoVerificadorModulo10($testInput) | ||
$digito | Should -Not -BeNullOrEmpty | ||
} | ||
} |