From 8031ce69ce0616c0da8bff86e3c99763d1e83bc4 Mon Sep 17 00:00:00 2001 From: yusyus Date: Sat, 29 Nov 2025 22:56:37 +0300 Subject: [PATCH] fix: Update test imports to use proper package names Fixed import paths in test_skip_llms_txt.py to use skill_seekers package name instead of old-style cli imports. Changes: - Updated import from 'cli.doc_scraper' to 'skill_seekers.cli.doc_scraper' - Updated logger names from 'cli.doc_scraper' to 'skill_seekers.cli.doc_scraper' - Removed sys.path manipulation (no longer needed with proper imports) All 17 tests now pass successfully (15 in test_skip_llms_txt.py + 2 in test_config_validation.py) --- tests/test_skip_llms_txt.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/test_skip_llms_txt.py b/tests/test_skip_llms_txt.py index 16d7745..f863b43 100644 --- a/tests/test_skip_llms_txt.py +++ b/tests/test_skip_llms_txt.py @@ -13,10 +13,7 @@ import unittest import logging from unittest.mock import patch, Mock, MagicMock -import sys -sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - -from cli.doc_scraper import DocToSkillConverter +from skill_seekers.cli.doc_scraper import DocToSkillConverter class TestSkipLlmsTxtConfig(unittest.TestCase): @@ -239,7 +236,7 @@ class TestSkipLlmsTxtEdgeCases(unittest.TestCase): 'skip_llms_txt': 0 # Invalid type } - with self.assertLogs('cli.doc_scraper', level='WARNING') as cm: + with self.assertLogs('skill_seekers.cli.doc_scraper', level='WARNING') as cm: converter = DocToSkillConverter(config, dry_run=True) self.assertFalse(converter.skip_llms_txt) self.assertTrue(any('Invalid value' in log and '0' in log for log in cm.output)) @@ -253,7 +250,7 @@ class TestSkipLlmsTxtEdgeCases(unittest.TestCase): 'skip_llms_txt': 1 # Invalid type } - with self.assertLogs('cli.doc_scraper', level='WARNING') as cm: + with self.assertLogs('skill_seekers.cli.doc_scraper', level='WARNING') as cm: converter = DocToSkillConverter(config, dry_run=True) self.assertFalse(converter.skip_llms_txt) self.assertTrue(any('Invalid value' in log and '1' in log for log in cm.output)) @@ -267,7 +264,7 @@ class TestSkipLlmsTxtEdgeCases(unittest.TestCase): 'skip_llms_txt': "true" # Invalid type } - with self.assertLogs('cli.doc_scraper', level='WARNING') as cm: + with self.assertLogs('skill_seekers.cli.doc_scraper', level='WARNING') as cm: converter = DocToSkillConverter(config, dry_run=True) self.assertFalse(converter.skip_llms_txt) self.assertTrue(any('Invalid value' in log and 'true' in log for log in cm.output)) @@ -281,7 +278,7 @@ class TestSkipLlmsTxtEdgeCases(unittest.TestCase): 'skip_llms_txt': None # Invalid type } - with self.assertLogs('cli.doc_scraper', level='WARNING') as cm: + with self.assertLogs('skill_seekers.cli.doc_scraper', level='WARNING') as cm: converter = DocToSkillConverter(config, dry_run=True) self.assertFalse(converter.skip_llms_txt) self.assertTrue(any('Invalid value' in log and 'None' in log for log in cm.output))