From dd4308ebdb1fd8068e313e4c4ad125eb61f1f181 Mon Sep 17 00:00:00 2001
From: Pierre LALET <pierre.lalet@cea.fr>
Date: Sat, 30 Sep 2017 18:05:41 +0200
Subject: [PATCH] Rename test_pyx to _test_pyx to "hide" it

---
 scapy/consts.py     | 4 ++--
 test/regression.uts | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/scapy/consts.py b/scapy/consts.py
index ff6b771b..8d33cfa1 100644
--- a/scapy/consts.py
+++ b/scapy/consts.py
@@ -27,7 +27,7 @@ except (ImportError, RuntimeError):
     MATPLOTLIB_DEFAULT_PLOT_KARGS = dict()
     log_loading.info("Can't import matplotlib. Won't be able to plot.")
 
-def test_pyx():
+def _test_pyx():
     """Returns if PyX is correctly installed or not"""
     try:
         with open(os.devnull, 'wb') as devnull:
@@ -39,7 +39,7 @@ def test_pyx():
 
 try:
     import pyx
-    if test_pyx():
+    if _test_pyx():
         PYX = 1
     else:
         log_loading.warning("PyX dependencies are not installed ! Please install TexLive or MikTeX.")
diff --git a/test/regression.uts b/test/regression.uts
index 1e33cb39..257917ae 100644
--- a/test/regression.uts
+++ b/test/regression.uts
@@ -9148,8 +9148,8 @@ test_afterglow()
 
 = psdump()
 
-print(test_pyx())
-if test_pyx():
+print("PYX: %d" % PYX)
+if PYX:
     import tempfile
     import os
     filename = tempfile.mktemp(suffix=".ps")
@@ -9160,8 +9160,8 @@ if test_pyx():
 
 = pdfdump()
 
-print(test_pyx())
-if test_pyx():
+print("PYX: %d" % PYX)
+if PYX:
     import tempfile
     import os
     filename = tempfile.mktemp(suffix=".pdf")
-- 
GitLab