Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add tests running python code

  • Loading branch information...
commit 42bfb28776c6fa7df1ae511116fe0eb443715dbf 1 parent 1d8f6d9
@szabgab authored
View
7 eg/python/xyz.py
@@ -0,0 +1,7 @@
+import sys
+
+print "Hello from Python!"
+print "What's your name ?"
+name = raw_input()
+print "My name is " + name
+sys.stderr.write("some error\n")
View
1  eg/python/xyz.py.err
@@ -0,0 +1 @@
+some error
View
1  eg/python/xyz.py.in
@@ -0,0 +1 @@
+Foo Bar
View
3  eg/python/xyz.py.out
@@ -0,0 +1,3 @@
+Hello from Python!
+What's your name ?
+My name is Foo Bar
View
17 t/10-python.t
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Snapshots;
+
+my $python = `python --version 2>&1`;
+#diag $python;
+
+if (not defined $python or $python !~ /^Python/) {
+ plan skip_all => 'Could not find python on this system';
+}
+
+Test::Snapshots::command('python');
+Test::Snapshots::set_glob('*.py');
+test_all_snapshots('eg/python');
+
Please sign in to comment.
Something went wrong with that request. Please try again.