Permalink
Browse files

add tests running python code

  • Loading branch information...
1 parent 1d8f6d9 commit 42bfb28776c6fa7df1ae511116fe0eb443715dbf @szabgab committed Apr 9, 2009
Showing with 29 additions and 0 deletions.
  1. +7 −0 eg/python/xyz.py
  2. +1 −0 eg/python/xyz.py.err
  3. +1 −0 eg/python/xyz.py.in
  4. +3 −0 eg/python/xyz.py.out
  5. +17 −0 t/10-python.t
View
@@ -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")
@@ -0,0 +1 @@
+some error
View
@@ -0,0 +1 @@
+Foo Bar
@@ -0,0 +1,3 @@
+Hello from Python!
+What's your name ?
+My name is Foo Bar
View
@@ -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');
+

0 comments on commit 42bfb28

Please sign in to comment.