Skip to contentSkip to conversation

support/testing: add test for python-pysmb

PATCH Applied yegorslists--- via buildroot 2 participants 2 messages Jul 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/testing: add test for python-pysmb

From: Yegor Yefremov <[email protected]>

---
 DEVELOPERS                                           |  2 ++
 support/testing/tests/package/sample_python_pysmb.py |  2 ++
 support/testing/tests/package/test_python_pysmb.py   | 12 ++++++++++++
 3 files changed, 16 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_pysmb.py
 create mode 100644 support/testing/tests/package/test_python_pysmb.py
DEVELOPERS +2 -0
index a6644819bd..58c8b4c8aa 100644
@@ -3146,11 +3146,13 @@ F:	package/zlog/
 F:	support/testing/tests/package/sample_python_dicttoxml2.py
 F:	support/testing/tests/package/sample_python_dtschema.py
 F:	support/testing/tests/package/sample_python_munch.py
+F:	support/testing/tests/package/sample_python_pysmb.py
 F:	support/testing/tests/package/test_libftdi1.py
 F:	support/testing/tests/package/test_python_can.py
 F:	support/testing/tests/package/test_python_dicttoxml2.py
 F:	support/testing/tests/package/test_python_dtschema.py
 F:	support/testing/tests/package/test_python_munch.py
+F:	support/testing/tests/package/test_python_pysmb.py
 F:	utils/scanpypi
 
 N:	Yunhao Tian <[email protected]>
support/testing/tests/package/sample_python_pysmb.py new file +2 -0
new file mode 100644
index 0000000000..68767f252a
@@ -0,0 +1,2 @@
+from nmb.NetBIOS import NetBIOS
+from smb.SMBHandler import SMBHandler
support/testing/tests/package/test_python_pysmb.py new file +12 -0
new file mode 100644
index 0000000000..cc4c7fb1e5
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Pysmb(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_PYSMB=y
+        """
+    sample_scripts = ["tests/package/sample_python_pysmb.py"]
+    timeout = 40
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Yegor, All,

On 2023-07-23 13:21 +0200, yegorslists--- via buildroot spake thusly:

Quoted 35 lines

From: Yegor Yefremov <[email protected]>

---
 DEVELOPERS                                           |  2 ++
 support/testing/tests/package/sample_python_pysmb.py |  2 ++
 support/testing/tests/package/test_python_pysmb.py   | 12 ++++++++++++
 3 files changed, 16 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_pysmb.py
 create mode 100644 support/testing/tests/package/test_python_pysmb.py
DEVELOPERS +2 -0
index a6644819bd..58c8b4c8aa 100644
@@ -3146,11 +3146,13 @@ F:	package/zlog/
 F:	support/testing/tests/package/sample_python_dicttoxml2.py
 F:	support/testing/tests/package/sample_python_dtschema.py
 F:	support/testing/tests/package/sample_python_munch.py
+F:	support/testing/tests/package/sample_python_pysmb.py
 F:	support/testing/tests/package/test_libftdi1.py
 F:	support/testing/tests/package/test_python_can.py
 F:	support/testing/tests/package/test_python_dicttoxml2.py
 F:	support/testing/tests/package/test_python_dtschema.py
 F:	support/testing/tests/package/test_python_munch.py
+F:	support/testing/tests/package/test_python_pysmb.py
 F:	utils/scanpypi
 
 N:	Yunhao Tian <[email protected]>
support/testing/tests/package/sample_python_pysmb.py new file +0 -0
new file mode 100644
index 0000000000..68767f252a

support/testing/tests/package/sample_python_pysmb.py line 2

Quoted 2 lines
support/testing/tests/package/sample_python_pysmb.py new file +2 -0
@@ -0,0 +1,2 @@
+from nmb.NetBIOS import NetBIOS
+from smb.SMBHandler import SMBHandler
    $ make check-package
    support/testing/tests/package/sample_python_pysmb.py:0: run 'flake8' and fix the warnings
    $ flake8 support/testing/tests/package/sample_python_pysmb.py
    support/testing/tests/package/sample_python_pysmb.py:1:1: F401 'nmb.NetBIOS.NetBIOS' imported but unused
    support/testing/tests/package/sample_python_pysmb.py:2:1: F401 'smb.SMBHandler.SMBHandler' imported but unused

I've fixed that (by adding a # noqa).

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 25 lines
support/testing/tests/package/test_python_pysmb.py new file +12 -0
new file mode 100644
index 0000000000..cc4c7fb1e5
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Pysmb(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_PYSMB=y
+        """
+    sample_scripts = ["tests/package/sample_python_pysmb.py"]
+    timeout = 40
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot