Class: LearnTest::Pytest::PipChecker

Inherits:
Object
  • Object
show all
Defined in:
lib/learn_test/strategies/pytest/requirements_checker.rb

Class Method Summary collapse

Class Method Details

.checkObject



33
34
35
36
37
38
# File 'lib/learn_test/strategies/pytest/requirements_checker.rb', line 33

def self.check
  if !self.pip_installed?
    puts "Please ensure pip is installed"
    exit
  end
end

.pip_installed?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/learn_test/strategies/pytest/requirements_checker.rb', line 40

def self.pip_installed?
  !`which pip`.empty?
end