summaryrefslogtreecommitdiff
path: root/python/samba/tests/core.py
AgeCommit message (Collapse)AuthorFilesLines
2024-06-12python: remove string_to_byte_array()Douglas Bagnall1-9/+1
This was a useful function during the Python 2 -> 3 migration, but it is not used any more. In all the cases it was used, we knew we already had a bytes object, and this was just an inefficient way of confirming that. In cases where we actually want to cast a string into a mutable list of byte-sized ints, the builtin bytearray() function will do a better job than this, because it will encode high unicode characters as utf-8 bytes, rather than adding them as out-of-range values in the list. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Jun 12 09:16:39 UTC 2024 on atb-devel-224
2023-06-23python:samba:tests: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2020-02-07pytests: heed assertEquals deprecation warning en-masseDouglas Bagnall1-8/+8
TestCase.assertEquals() is an alias for TestCase.assertEqual() and has been deprecated since Python 2.7. When we run our tests with in python developer mode (`PYTHONDEVMODE=1 make test`) we get 580 DeprecationWarnings about this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2018-08-24PEP8: fix E302: expected 2 blank lines, found 1Joe Guo1-0/+4
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E128: continuation line under-indented for visual indentJoe Guo1-6/+6
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-05-19python3:tests: Fix Python 3 test issuesPetr Viktorin1-2/+2
- Forgotten text strings that should be binary - Inverted PY3 condition Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-03-10python: samba.tests.core: Port and enable core tests in Python 3Lumir Balhar1-2/+2
Port samba core tests to Python 3 compatible form and enable their execution with Python 3. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-02-03python:tests/core: add tests for arcfour_encrypt() and string_to_byte_array()Stefan Metzmacher1-0/+16
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11699 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Feb 3 11:42:29 CET 2016 on sn-devel-144
2013-03-02Move python modules from source4/scripting/python/ to python/.Jelmer Vernooij1-0/+63
Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 2 03:57:34 CET 2013 on sn-devel-104