Skip to content

Commit

Permalink
add Python black box tests to Python CI
Browse files Browse the repository at this point in the history
(first attempt will need follow-on sw tweaks)
  • Loading branch information
ikluft committed May 10, 2024
1 parent f8ca03c commit 905524e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ jobs:
run: |
pip install -e .
python timezone_solar/tests
- name: Run black box tests
run: |
prove test/cli-test-python.t
23 changes: 23 additions & 0 deletions test/cli-test-python.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env perl
# cli-test-python.t - run LongitudeTZ black box tests for Python implementation
# (this script is in Perl for 'prove' program to launch the tests consistently)
# by Ian Kluft (IKLUFT), [email protected]
# created 05/09/2024

use strict;
use warnings;
use Config;
use File::Basename;
use FindBin qw($Bin);

# collect parameters
my $debug = ( $ENV{LONGITUDE_TZ_TEST_DEBUG} // 0 ) ? 1 : 0;
my $bin_dir = $Bin;
my $tree_root = dirname($bin_dir);
my $perl_path = $Config{perlpath};

# run black box test command
exec $perl_path $perl_path,
"$bin_dir/cli-test.pl",
( $debug ? "--debug" : ()),
"$tree_root/src/python/scripts/lon_tz.py";

0 comments on commit 905524e

Please sign in to comment.