[master 2/3] make use of /usr/bin/env python to avoid hard-coding the python version

atodorov installerbot-noreply at redhat.com
Mon May 25 09:53:30 UTC 2015


From: Alexander Todorov <atodorov at redhat.com>

---
 tests/action_test.py                         | 2 +-
 tests/devicefactory_test.py                  | 2 +-
 tests/devicelibs_test/dasd_test.py           | 2 +-
 tests/devicelibs_test/mdraid_test.py         | 2 +-
 tests/devicelibs_test/raid_test.py           | 5 ++++-
 tests/devices_test/dependencies_test.py      | 2 +-
 tests/devices_test/device_names_test.py      | 2 +-
 tests/devices_test/device_packages_test.py   | 2 +-
 tests/devices_test/device_properties_test.py | 2 +-
 tests/devices_test/lvm_test.py               | 2 +-
 tests/devices_test/network_test.py           | 2 +-
 tests/devices_test/partition_test.py         | 2 +-
 tests/formats_test/device_test.py            | 2 +-
 tests/formats_test/fs_test.py                | 2 +-
 tests/formats_test/fslabeling.py             | 2 +-
 tests/formats_test/fstesting.py              | 2 +-
 tests/formats_test/init_test.py              | 2 +-
 tests/formats_test/labeling_test.py          | 2 +-
 tests/formats_test/selinux_test.py           | 2 +-
 tests/partitioning_test.py                   | 2 +-
 tests/size_test.py                           | 2 +-
 tests/storagetestcase.py                     | 2 +-
 tests/tsort_test.py                          | 1 +
 tests/udev_test.py                           | 2 +-
 tests/util_test.py                           | 2 +-
 25 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/tests/action_test.py b/tests/action_test.py
index 69b2c86..c1559f7 100644
--- a/tests/action_test.py
+++ b/tests/action_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import unittest
 
diff --git a/tests/devicefactory_test.py b/tests/devicefactory_test.py
index 8ea43cb..824734e 100644
--- a/tests/devicefactory_test.py
+++ b/tests/devicefactory_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import unittest
 
diff --git a/tests/devicelibs_test/dasd_test.py b/tests/devicelibs_test/dasd_test.py
index 98f2cd1..e2eaf42 100644
--- a/tests/devicelibs_test/dasd_test.py
+++ b/tests/devicelibs_test/dasd_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 import unittest
 
 import blivet.devicelibs.dasd as dasd
diff --git a/tests/devicelibs_test/mdraid_test.py b/tests/devicelibs_test/mdraid_test.py
index 6408f03..5cd1890 100755
--- a/tests/devicelibs_test/mdraid_test.py
+++ b/tests/devicelibs_test/mdraid_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 import unittest
 
 import blivet.devicelibs.mdraid as mdraid
diff --git a/tests/devicelibs_test/raid_test.py b/tests/devicelibs_test/raid_test.py
index ba1a580..d0cb29e 100644
--- a/tests/devicelibs_test/raid_test.py
+++ b/tests/devicelibs_test/raid_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 import unittest
 
 import blivet.devicelibs.raid as raid
@@ -154,3 +154,6 @@ def testRaid(self):
 
         with self.assertRaisesRegexp(errors.RaidError, "invalid standard RAID level descriptor"):
             raid.RAIDLevels(["raid3.1415"])
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/devices_test/dependencies_test.py b/tests/devices_test/dependencies_test.py
index 55ea3de..276cd54 100644
--- a/tests/devices_test/dependencies_test.py
+++ b/tests/devices_test/dependencies_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # vim:set fileencoding=utf-8
 
 import unittest
diff --git a/tests/devices_test/device_names_test.py b/tests/devices_test/device_names_test.py
index f15f471..fc66f3f 100644
--- a/tests/devices_test/device_names_test.py
+++ b/tests/devices_test/device_names_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # vim:set fileencoding=utf-8
 
 import unittest
diff --git a/tests/devices_test/device_packages_test.py b/tests/devices_test/device_packages_test.py
index a3295f5..68abb1c 100644
--- a/tests/devices_test/device_packages_test.py
+++ b/tests/devices_test/device_packages_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # vim:set fileencoding=utf-8
 
 import unittest
diff --git a/tests/devices_test/device_properties_test.py b/tests/devices_test/device_properties_test.py
index 8330c2d..5dbcb12 100644
--- a/tests/devices_test/device_properties_test.py
+++ b/tests/devices_test/device_properties_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # vim:set fileencoding=utf-8
 
 import unittest
diff --git a/tests/devices_test/lvm_test.py b/tests/devices_test/lvm_test.py
index 72fbd83..f2dac38 100644
--- a/tests/devices_test/lvm_test.py
+++ b/tests/devices_test/lvm_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # vim:set fileencoding=utf-8
 
 import unittest
diff --git a/tests/devices_test/network_test.py b/tests/devices_test/network_test.py
index 8a954fc..90cf0f0 100644
--- a/tests/devices_test/network_test.py
+++ b/tests/devices_test/network_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # vim:set fileencoding=utf-8
 
 import unittest
diff --git a/tests/devices_test/partition_test.py b/tests/devices_test/partition_test.py
index b4fef6c..b882c46 100644
--- a/tests/devices_test/partition_test.py
+++ b/tests/devices_test/partition_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # vim:set fileencoding=utf-8
 
 import os
diff --git a/tests/formats_test/device_test.py b/tests/formats_test/device_test.py
index 588cb97..ad5044c 100755
--- a/tests/formats_test/device_test.py
+++ b/tests/formats_test/device_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 import unittest
 
 import blivet
diff --git a/tests/formats_test/fs_test.py b/tests/formats_test/fs_test.py
index 71fa524..6ab802a 100755
--- a/tests/formats_test/fs_test.py
+++ b/tests/formats_test/fs_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 import os
 import tempfile
 import unittest
diff --git a/tests/formats_test/fslabeling.py b/tests/formats_test/fslabeling.py
index 200cffe..56f66e8 100644
--- a/tests/formats_test/fslabeling.py
+++ b/tests/formats_test/fslabeling.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import abc
 from six import add_metaclass
diff --git a/tests/formats_test/fstesting.py b/tests/formats_test/fstesting.py
index dad6e3f..7525212 100644
--- a/tests/formats_test/fstesting.py
+++ b/tests/formats_test/fstesting.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import abc
 from six import add_metaclass
diff --git a/tests/formats_test/init_test.py b/tests/formats_test/init_test.py
index 6fc11c6..7faefca 100644
--- a/tests/formats_test/init_test.py
+++ b/tests/formats_test/init_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 import copy
 import unittest
 
diff --git a/tests/formats_test/labeling_test.py b/tests/formats_test/labeling_test.py
index 4f69e81..5e30dd2 100755
--- a/tests/formats_test/labeling_test.py
+++ b/tests/formats_test/labeling_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 import unittest
 
 from tests import loopbackedtestcase
diff --git a/tests/formats_test/selinux_test.py b/tests/formats_test/selinux_test.py
index b5c62eb..4d512dc 100755
--- a/tests/formats_test/selinux_test.py
+++ b/tests/formats_test/selinux_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 import os
 import selinux
 import tempfile
diff --git a/tests/partitioning_test.py b/tests/partitioning_test.py
index 0a301bc..2d17024 100644
--- a/tests/partitioning_test.py
+++ b/tests/partitioning_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import unittest
 from mock import Mock
diff --git a/tests/size_test.py b/tests/size_test.py
index 9416d71..3a7c01c 100644
--- a/tests/size_test.py
+++ b/tests/size_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # pylint: disable=environment-modify
 #
 # tests/storage/size_tests.py
diff --git a/tests/storagetestcase.py b/tests/storagetestcase.py
index ad1216f..dfa4318 100644
--- a/tests/storagetestcase.py
+++ b/tests/storagetestcase.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import unittest
 from mock import Mock
diff --git a/tests/tsort_test.py b/tests/tsort_test.py
index 640becd..ee06509 100644
--- a/tests/tsort_test.py
+++ b/tests/tsort_test.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
 
 import unittest
 import blivet.tsort
diff --git a/tests/udev_test.py b/tests/udev_test.py
index e3e817d..9d570ad 100644
--- a/tests/udev_test.py
+++ b/tests/udev_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import unittest
 import mock
diff --git a/tests/util_test.py b/tests/util_test.py
index fe7a841..1aa6b1b 100644
--- a/tests/util_test.py
+++ b/tests/util_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import unittest
 from decimal import Decimal


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/a5d7cb2eda6f3e9567e3dccbfd292390ee1114fd


More information about the anaconda-patches mailing list