Sha256: 3bea0fbc0cddd344ec1c924ded92777e1da444597f18835cc16946096386435b

Contents?: true

Size: 1020 Bytes

Versions: 31

Compression:

Stored size: 1020 Bytes

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class SyntheyesAllPathsImportTest < Test::Unit::TestCase
  DELTA = 0.001 # our SynthEyes sample is somewhat inaccurate :-P
  
  def test_introspects_properly
    i = Tracksperanto::Import::SyntheyesAllTrackerPaths
    assert_equal "Syntheyes \"All Tracker Paths\" export .txt file", i.human_name
    assert !i.autodetects_size?
  end
  
  def test_parsing_from_importable
    fixture = File.open(File.dirname(__FILE__) + '/samples/syntheyes_all_tracker_paths/shot06_2dTracks.txt')
    trackers = Tracksperanto::Import::SyntheyesAllTrackerPaths.new(:io => fixture, :width => 2560, :height => 1080).to_a
    assert_equal 139, trackers.length
    assert_equal "Tracker2_", trackers[0].name
    assert_equal "Tracker3_", trackers[1].name
    assert_equal 44, trackers[0].length
    
    first_kf = trackers[0].at_frame(0)
    assert_in_delta 760.632, first_kf.abs_x, DELTA
    assert_in_delta 760.0, first_kf.abs_y, DELTA
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
tracksperanto-3.0.1 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-3.0.0 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.12.0 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.11.3 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.11.2 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.11.1 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.11.0 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.10.0 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.9.9 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.9.8 test/import/test_syntheyes_all_tracker_paths_import.rb
tracksperanto-2.9.7 test/import/test_syntheyes_all_tracker_paths_import.rb