Base Model für CITT erstellt, PTM Dortmund ergänzt, Tests hinzugefügt
This commit is contained in:
0
tests/helper/__init__.py
Normal file
0
tests/helper/__init__.py
Normal file
24
tests/helper/filehandling_test.py
Normal file
24
tests/helper/filehandling_test.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import glob
|
||||
import logging
|
||||
import os
|
||||
|
||||
from src.paveit.helper import read_file_to_bytesio
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
data_path = 'tests/data/citt/PTM_Dortmund'
|
||||
|
||||
|
||||
def test_read_file_compare_filesize():
|
||||
|
||||
files = glob.glob(os.path.join(data_path, '*.xlsm'))
|
||||
|
||||
for file in files:
|
||||
|
||||
file_stat = os.stat(file)
|
||||
file_size = file_stat.st_size
|
||||
|
||||
buf = read_file_to_bytesio(file)
|
||||
buf_size = buf.getbuffer().nbytes
|
||||
|
||||
assert file_size == buf_size
|
||||
Reference in New Issue
Block a user