From 3f713131eb0c17fa710a1dce55ed227059dd145f Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 21 Sep 2025 12:32:33 -0400 Subject: [PATCH] fix(ci): var shadowing and proper mocking --- spec/scraper_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/scraper_spec.lua b/spec/scraper_spec.lua index d64445d..96030e2 100644 --- a/spec/scraper_spec.lua +++ b/spec/scraper_spec.lua @@ -1,6 +1,7 @@ describe('cp.scrape', function() local scrape local mock_cache + local mock_utils local mock_system_calls local temp_files local spec_helper = require('spec.spec_helper') @@ -45,7 +46,7 @@ describe('cp.scrape', function() } end - local mock_utils = { + mock_utils = { setup_python_env = function() return true end, @@ -178,14 +179,13 @@ describe('cp.scrape', function() it('handles python environment setup failure', function() local cache = require('cp.cache') - local utils = require('cp.utils') cache.load = function() end cache.get_contest_data = function() return nil end - utils.setup_python_env = function() + mock_utils.setup_python_env = function() return false end