Blame SOURCES/0001-test-fix-discovery-of-location.patch

9c7a52
From 1d416bb862a4b85b85ad7a4be4ba106703d975ec Mon Sep 17 00:00:00 2001
9c7a52
From: Pino Toscano <ptoscano@redhat.com>
9c7a52
Date: Fri, 12 Oct 2018 12:50:18 +0200
9c7a52
Subject: [PATCH] test: fix discovery of location
9c7a52
9c7a52
Use __file__ to detect the location of the script instead of sys.argv,
9c7a52
so it will work also when loaded as module.
9c7a52
9c7a52
(cherry picked from commit d93e1563add8c40450556b7d74520439ee792bd9)
9c7a52
---
9c7a52
 test/test_augeas.py | 2 +-
9c7a52
 1 file changed, 1 insertion(+), 1 deletion(-)
9c7a52
9c7a52
diff --git a/test/test_augeas.py b/test/test_augeas.py
9c7a52
index 10edbe6..7474841 100644
9c7a52
--- a/test/test_augeas.py
9c7a52
+++ b/test/test_augeas.py
9c7a52
@@ -4,7 +4,7 @@ import unittest
9c7a52
 import sys
9c7a52
 import os
9c7a52
 
9c7a52
-__mydir = os.path.dirname(sys.argv[0])
9c7a52
+__mydir = os.path.dirname(os.path.abspath(__file__))
9c7a52
 if not os.path.isdir(__mydir):
9c7a52
     __mydir = os.getcwd()
9c7a52
 
9c7a52
-- 
9c7a52
2.21.0
9c7a52