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)
This commit is contained in:
yusyus
2025-11-29 22:56:37 +03:00
parent 91692db87c
commit 8031ce69ce

View File

@@ -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))