<commit_before>require 'spec_helper'

describe 'python' do

  on_supported_os.each do |os, facts|
    context "on #{os}" do
      let(:facts) { facts }

      context "with system version" do
        let(:params) {{
          :pip => false,
          :dev => false,
          :virtualenv => false,
          :version => 'system'
        }}

        it { is_expected.to compile.with_all_deps }
        it { is_expected.to contain_class("python::install") }

        context 'with dev' do
          let(:params) {{
            :version => 'system',
            :dev => true,
            :pip => false,
            :virtualenv => false,
          }}

          case facts[:osfamily]
          when 'RedHat'
            it { is_expected.to contain_package('python-devel') }
          when 'Debian'
            it { is_expected.to contain_package('python-dev') }
          else
          end
        end

        context 'with pip' do
          let(:params) {{
            :version => 'system',
            :pip => true,
            :dev => false,
            :virtualenv => false,
          }}

          case facts[:kernel]
          when 'Linux'
            it { is_expected.to contain_package('python-pip') }

          when 'FreeBSD'
            it { is_expected.to contain_package('py27-pip') }

          when 'OpenBSd'
            it { is_expected.to contain_package('py-pip') }

          else
            it { is_expected.to_not contain_package('py27-pip') }
            it { is_expected.to_not contain_package('python-pip') }
            it { is_expected.to_not contain_package('python3-pip') }
          end

        end

        context 'with virtualenv' do 
          let(:params) {{
            :version => 'system',
            :virtualenv => true,
            :dev => false,
            :pip => false,<commit_msg>Spell OpenBSD with correct capitalization<commit_after>require 'spec_helper'

describe 'python' do

  on_supported_os.each do |os, facts|
    context "on #{os}" do
      let(:facts) { facts }

      context "with system version" do
        let(:params) {{
          :pip => false,
          :dev => false,
          :virtualenv => false,
          :version => 'system'
        }}

        it { is_expected.to compile.with_all_deps }
        it { is_expected.to contain_class("python::install") }

        context 'with dev' do
          let(:params) {{
            :version => 'system',
            :dev => true,
            :pip => false,
            :virtualenv => false,
          }}

          case facts[:osfamily]
          when 'RedHat'
            it { is_expected.to contain_package('python-devel') }
          when 'Debian'
            it { is_expected.to contain_package('python-dev') }
          else
          end
        end

        context 'with pip' do
          let(:params) {{
            :version => 'system',
            :pip => true,
            :dev => false,
            :virtualenv => false,
          }}

          case facts[:kernel]
          when 'Linux'
            it { is_expected.to contain_package('python-pip') }

          when 'FreeBSD'
            it { is_expected.to contain_package('py27-pip') }

          when 'OpenBSD'
            it { is_expected.to contain_package('py-pip') }

          else
            it { is_expected.to_not contain_package('py27-pip') }
            it { is_expected.to_not contain_package('python-pip') }
            it { is_expected.to_not contain_package('python3-pip') }
          end

        end

        context 'with virtualenv' do 
          let(:params) {{
            :version => 'system',
            :virtualenv => true,
            :dev => false,
            :pip => false,
{'fraction_non_alphanumeric': 0.11908646003262642, 'fraction_numerical': 0.0027188689505165853, 'mean_word_length': 1.525051475634866, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1851684', 'n_tokens_mistral': 1076, 'n_tokens_neox': 1012, 'n_words': 239}