Skip to content

Commit

Permalink
ups
Browse files Browse the repository at this point in the history
  • Loading branch information
F-Bk committed Nov 27, 2024
1 parent 2f67fc0 commit 9851cab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
3 changes: 1 addition & 2 deletions test/asammdf/gui/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ class DragAndDrop
- responsible to perform Drag and Drop operations
from source widget - specific point, to destination widget - specific point
"""
import _io
from collections.abc import Iterable
import os
import pathlib
import shutil
import sys
import time
import unittest
from collections.abc import Iterable
from unittest import mock

from h5py import File as HDF5
Expand Down
26 changes: 12 additions & 14 deletions test/asammdf/gui/widgets/batch/test_BatchWidget_Tab_BusLogging.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#!/usr/bin/env python
import os
import shutil
import urllib
import urllib.request
from pathlib import Path
from unittest import mock
import urllib
import urllib.request
from zipfile import ZipFile

from PySide6 import QtCore, QtTest

from asammdf.blocks.utils import load_can_database
from test.asammdf.gui.test_base import OpenMDF, DBC
from test.asammdf.gui.test_base import DBC, OpenMDF
from test.asammdf.gui.widgets.test_BaseBatchWidget import TestBatchWidget

# Note: If it's possible and make sense, use self.subTests
Expand All @@ -20,15 +18,15 @@
class TestPushButtons(TestBatchWidget):
def setUp(self):
super().setUp()
# url = "https://github.com/danielhrisca/asammdf/files/4328945/OBD2-DBC-MDF4.zip"
# urllib.request.urlretrieve(url, "test.zip")
# ZipFile(r"test.zip").extractall(self.test_workspace)
# Path("test.zip").unlink()
#
tmp_path = Path("D:\\GHP\\tmp\\asammdf\\BUS")

for file in tmp_path.iterdir():
shutil.copy(file, self.test_workspace)
url = "https://github.com/danielhrisca/asammdf/files/4328945/OBD2-DBC-MDF4.zip"
urllib.request.urlretrieve(url, "test.zip")
ZipFile(r"test.zip").extractall(self.test_workspace)
Path("test.zip").unlink()

# tmp_path = Path("D:\\GHP\\tmp\\asammdf\\BUS")
# for file in tmp_path.iterdir():
# shutil.copy(file, self.test_workspace)

temp_dir = Path(self.test_workspace)

# Get test files path
Expand Down
2 changes: 1 addition & 1 deletion test/asammdf/gui/widgets/test_BaseBatchWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from PySide6 import QtCore
from PySide6.QtTest import QTest
from PySide6.QtWidgets import QTreeWidgetItemIterator, QPushButton
from PySide6.QtWidgets import QPushButton, QTreeWidgetItemIterator

from asammdf.gui.widgets.batch import BatchWidget
from test.asammdf.gui.test_base import TestBase
Expand Down

0 comments on commit 9851cab

Please sign in to comment.