control 'python35' do
  attribute_file = '/tmp/kitchen/node_attributes.json'
  if file(attribute_file).exist?
    node = json(attribute_file).params
    case node['automatic']['platform_family']
    when 'rhel'
      if node['automatic']['platform_version'].to_s.start_with?('7')
        describe command 'python3.5 -V' do
          its('exit_status') { should eq 0 }
        end
        packages = %w(
          python35u
          python35u-libs
          python35u-devel
          python35u-pip
        )

        packages.each do |name|
          describe package name do
            it { should be_installed }
          end
        end

      end
    end
  end
end
