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

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