Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 1 addition & 64 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,64 +1 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDE
.idea/
.vscode/
*.swp
*.swo

logs
*.log
Nothing should be ignored in this case, as the only change is a modification to a Python test file (`tests/test_tools_utils.py`), which is a source code file that should be tracked in version control. There are no build artifacts, dependencies, temporary files, or other items that need to be added to .gitignore.
412 changes: 412 additions & 0 deletions logs/logger.log

Large diffs are not rendered by default.

Binary file added pymagic/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file added pymagic/__pycache__/_base.cpython-312.pyc
Binary file not shown.
Binary file added pymagic/__pycache__/_response.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file added pymagic/__pycache__/logger_utils.cpython-312.pyc
Binary file not shown.
Binary file added pymagic/__pycache__/tools_utils.cpython-312.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
loguru>=0.7.0
Binary file added tests/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/test_tools_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def test_contain_any(self):
def test_format_time(self):
"""测试时间格式化功能"""
# 使用固定的时间戳进行测试
timestamp = 1609459200 # 2021-01-01 08:00:00
self.assertEqual(Tools.format_time(timestamp), "2021-01-01 08:00:00")
timestamp = 1609459200 # 2021-01-01 00:00:00 UTC
self.assertEqual(Tools.format_time(timestamp), "2021-01-01 00:00:00")
self.assertEqual(Tools.format_time(timestamp, "%Y-%m-%d"), "2021-01-01")

def test_get_timestamp(self):
Expand Down