first commit
This commit is contained in:
23
tests/test_holidays_path.py
Normal file
23
tests/test_holidays_path.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Add src to path to import holidays module
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))
|
||||
|
||||
import holidays
|
||||
|
||||
def test_paths():
|
||||
print("Current working directory:", os.getcwd())
|
||||
print("Script directory:", os.path.dirname(__file__))
|
||||
|
||||
# Print the HOLIDAYS_FILE constant from holidays module
|
||||
print(f"HOLIDAYS_FILE constant: {holidays.HOLIDAYS_FILE}")
|
||||
print(f"File exists: {os.path.exists(holidays.HOLIDAYS_FILE)}")
|
||||
|
||||
# Try to load holidays
|
||||
print("\nTrying to load holidays...")
|
||||
holidays_data = holidays.load_holidays()
|
||||
print(f"Loaded holidays data for {len(holidays_data)} years")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_paths()
|
||||
Reference in New Issue
Block a user