Project

General

Profile

Actions

Optimization #2645

closed

Fix deprecation warnings in tests.

Added by Jason Ish about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
Effort:
low
Difficulty:
medium
Label:

Description

When running tests with Python 3.7 I see some deprecation warnings like:

/home/jason/oisf/code/suricata-update/oisf/tests/test_rule.py:162: DeprecationWarning: invalid escape sequence \;
  self.assertEqual(rule.msg, "TEST RULE\; and some")

and

/home/jason/oisf/code/suricata-update/oisf/.tox/py37/lib/python3.7/site-packages/suricata/update/net.py:67: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
  distribution = platform.linux_distribution()

Let see if we can fix these in a way that is also compatible with Python 2.7.

Actions

Also available in: Atom PDF