rubypython 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.2.8 2009-10-05
2
+ * Bug Fixes
3
+ * Some test files were improperly formatted (minor bug fix).
1
4
  == 0.2.7 2009-3-30
2
5
  * Bug Fixes
3
6
  * Fixed some bugs which caused rubypython to be unable to determine python version correctly.
@@ -2,7 +2,7 @@ module RubyPython
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 7
5
+ TINY = 8
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -7,19 +7,19 @@ class TestRubypython < Test::Unit::TestCase
7
7
 
8
8
 
9
9
  def test_simple
10
- assert RubyPython.start
11
- assert RubyPython.import "urllib"
12
- assert(RubyPython.stop)
13
- assert(!RubyPython.stop)
10
+ assert(RubyPython.start,"RubyPython failed to initialize.")
11
+ assert(RubyPython.import("urllib"), "urllib library import failed.")
12
+ assert(RubyPython.stop,"RubyPython failed to halt.")
13
+ assert(!RubyPython.stop,"RubyPython did not realize it had halted.")
14
14
  end
15
15
 
16
16
  def test_delegation
17
17
  RubyPython.start
18
18
  cPickle=RubyPython.import("cPickle")
19
19
  assert_instance_of(RubyPythonBridge::RubyPyModule,cPickle)
20
- assert_equal(cPickle.loads("(dp1\nS'a'\nS'n'\ns(I1\nS'2'\ntp2\nI4\ns."),{"a"=>"n", [1, "2"]=>4})
20
+ assert_equal({"a"=>"n", [1, "2"]=>4},cPickle.loads("(dp1\nS'a'\nS'n'\ns(I1\nS'2'\ntp2\nI4\ns."))
21
21
  dumped_array=cPickle.dumps([1,2,3,4])
22
- assert_equal(cPickle.loads(dumped_array),[1,2,3,4])
22
+ assert_equal([1,2,3,4],cPickle.loads(dumped_array))
23
23
  assert_raise NoMethodError do
24
24
  cPickle.splack
25
25
  end
@@ -38,7 +38,7 @@ class TestRubypython < Test::Unit::TestCase
38
38
  RubyPython.stop
39
39
  end
40
40
 
41
- def test_propogate_python_errror
41
+ def test_propogate_python_error
42
42
  RubyPython.start
43
43
  assert_raise PythonError do
44
44
  RubyPython.import "slasdfj"
@@ -53,7 +53,7 @@ class TestRubypython < Test::Unit::TestCase
53
53
  cPickle.inspect
54
54
  unpickled=cPickle.loads("(dp1\nS'a'\nS'n'\ns(I1\nS'2'\ntp2\nI4\ns.")
55
55
  end
56
- assert_equal(unpickled,{"a"=>"n", [1, "2"]=>4})
56
+ assert_equal({"a"=>"n", [1, "2"]=>4},unpickled)
57
57
  assert(!RubyPython.stop)
58
58
  end
59
59
 
@@ -61,14 +61,14 @@ class TestRubypython < Test::Unit::TestCase
61
61
  RubyPython.start
62
62
  wave=RubyPython.import "wave"
63
63
  w=wave.open("test/test.wav","rb")
64
- assert_equal(w.getframerate,9600)
64
+ assert_equal(9600,w.getframerate)
65
65
  w.close
66
66
  RubyPython.stop
67
67
  end
68
68
 
69
69
  def test_pymain_delegation
70
70
  RubyPython.start
71
- assert_equal(PyMain.float(42),42.to_f)
71
+ assert_equal(42.to_f,PyMain.float(42))
72
72
  RubyPython.stop
73
73
  end
74
74
 
@@ -78,7 +78,7 @@ class TestRubypython < Test::Unit::TestCase
78
78
  returned=PyMain.float(22) do |f|
79
79
  f*2
80
80
  end
81
- assert_equal(returned,44.0)
81
+ assert_equal(44.0,returned)
82
82
  RubyPython.stop
83
83
  end
84
84
 
@@ -86,7 +86,7 @@ class TestRubypython < Test::Unit::TestCase
86
86
  RubyPython.session do
87
87
  cPickle=RubyPython.import "cPickle"
88
88
  cPickle.inspect
89
- assert_equal(cPickle.loads("(dp1\nS'a'\nS'n'\ns(I1\nS'2'\ntp2\nI4\ns."),{"a"=>"n", [1, "2"]=>4})
89
+ assert_equal({"a"=>"n", [1, "2"]=>4},cPickle.loads("(dp1\nS'a'\nS'n'\ns(I1\nS'2'\ntp2\nI4\ns."))
90
90
  end
91
91
  end
92
92
 
@@ -7,7 +7,7 @@ class TestRubyPythonBridgeExtn < Test::Unit::TestCase
7
7
 
8
8
  def test_func_with_module
9
9
  pickle_return=RubyPythonBridge.func("cPickle","loads","(dp1\nS'a'\nS'n'\ns(I1\nS'2'\ntp2\nI4\ns.")
10
- assert_equal(pickle_return,{"a"=>"n", [1, "2"]=>4})
10
+ assert_equal({"a"=>"n", [1, "2"]=>4},pickle_return)
11
11
  end
12
12
 
13
13
  def test_start_stop
@@ -53,7 +53,7 @@ class TestRubyPythonBridgeWithCPickle < Test::Unit::TestCase
53
53
  end
54
54
 
55
55
  def test_data_passing
56
- assert_equal(@cPickle.loads("(dp1\nS'a'\nS'n'\ns(I1\nS'2'\ntp2\nI4\ns."),{"a"=>"n", [1, "2"]=>4})
56
+ assert_equal({"a"=>"n", [1, "2"]=>4},@cPickle.loads("(dp1\nS'a'\nS'n'\ns(I1\nS'2'\ntp2\nI4\ns."))
57
57
  dumped_array=@cPickle.dumps([1,2,3,4])
58
58
  assert_equal(@cPickle.loads(dumped_array),[1,2,3,4])
59
59
  end
data/website/index.txt CHANGED
@@ -11,7 +11,7 @@ h2. Installing
11
11
 
12
12
  Don't worry if you got some ugly output from RDOC and RI.
13
13
 
14
- h2. The basics
14
+ h2. The Basics
15
15
 
16
16
  Check out the RDOC pages at "http://rubypython.rubyforge.org/rdoc":http://rubypython.rubyforge.org/rdoc
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubypython
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Raines
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-10 00:00:00 -04:00
12
+ date: 2009-10-05 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency