Core: ensure requirements files end on newline (#4761)

This commit is contained in:
Fabian Dill
2025-03-24 22:26:30 +01:00
committed by GitHub
parent e12ab4afa4
commit 82b0819051
7 changed files with 25 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
import unittest
import os
class TestBase(unittest.TestCase):
def test_requirements_file_ends_on_newline(self):
"""Test that all requirements files end on a newline"""
import Utils
requirements_files = [Utils.local_path("requirements.txt"),
Utils.local_path("WebHostLib", "requirements.txt")]
worlds_path = Utils.local_path("worlds")
for entry in os.listdir(worlds_path):
requirements_path = os.path.join(worlds_path, entry, "requirements.txt")
if os.path.isfile(requirements_path):
requirements_files.append(requirements_path)
for requirements_file in requirements_files:
with self.subTest(path=requirements_file):
with open(requirements_file) as f:
self.assertEqual(f.read()[-1], "\n")

View File

@@ -3,4 +3,4 @@ mpyq>=0.2.5
portpicker>=1.5.2
aiohttp>=3.8.4
loguru>=0.7.0
protobuf==3.20.3
protobuf==3.20.3

View File

@@ -1,2 +1,2 @@
maseya-z3pr>=1.0.0rc1
xxtea>=3.0.0
xxtea>=3.0.0

View File

@@ -1 +1 @@
Pymem>=1.10.0
Pymem>=1.10.0

View File

@@ -1 +1 @@
requests >= 2.28.1 # used by client
requests >= 2.28.1 # used by client

View File

@@ -1 +1 @@
bsdiff4>=1.2.2
bsdiff4>=1.2.2

View File

@@ -1 +1 @@
Pymem>=1.13.0
Pymem>=1.13.0