Files
scylladb/test/redis
Nadav Har'El 2581b54ea0 test/{alternator,redis}: stop using deprecated "disutils" package
Python has deprecated the distutils package. In several places in the
Alternator and Redis test suites, we used distutils.version to check if
the library is new enough for running the test (and skip the test if
it's too old). On new versions of Python, we started getting deprecation
warnings such as:

    DeprecationWarning: The distutils package is deprecated and slated for
    removal in Python 3.12. Use setuptools or check PEP 632 for potential
    alternatives

PEP 632 recommends using package.version instead of distutils.version,
and indeed it works well. After applying this patch, Alternator and
Redis test runs no long end in silly deprecation warnings.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>

Closes #11007
2022-07-11 08:00:45 +03:00
..

Tests for Scylla with Redis API that should also pass, identically, against Redis.

Tests use the redis library for Redis API, and the pytest frameworks (both are available from Linux distributions, or with "pip install").

To run all tests against the local installation of Scylla with Redis API on localhost:6379, just run pytest.

Some additional pytest options:

  • To run all tests in a single file, do pytest test_strings.py.
  • To run a single specific test, do pytest test_strings.py::set.
  • Additional useful pytest options, especially useful for debugging tests:
    • -v: show the names of each individual test running instead of just dots.
    • -s: show the full output of running tests (by default, pytest captures the test's output and only displays it if a test fails)