From 7d5f4d3ab99992a1776c80ad2f85bde5693bfbd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Tue, 14 Aug 2018 10:34:13 +0200 Subject: [PATCH] added cwd setup boiler-plate to *.TestCase where missing --- tests/exception.TestCase | 2 ++ tests/import.TestCase | 2 ++ tests/install.TestCase | 2 ++ tests/lint.TestCase | 2 ++ tests/metadata.TestCase | 2 ++ tests/publish.TestCase | 2 ++ tests/scanner.TestCase | 2 ++ tests/signatures.TestCase | 2 ++ 8 files changed, 16 insertions(+) diff --git a/tests/exception.TestCase b/tests/exception.TestCase index 6c2f0c3e..2551b558 100755 --- a/tests/exception.TestCase +++ b/tests/exception.TestCase @@ -54,6 +54,8 @@ class ExceptionTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal") diff --git a/tests/import.TestCase b/tests/import.TestCase index 76427c59..18852628 100755 --- a/tests/import.TestCase +++ b/tests/import.TestCase @@ -55,6 +55,8 @@ class ImportTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal") diff --git a/tests/install.TestCase b/tests/install.TestCase index 27573eae..e7bdb6e2 100755 --- a/tests/install.TestCase +++ b/tests/install.TestCase @@ -35,6 +35,8 @@ class InstallTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal") diff --git a/tests/lint.TestCase b/tests/lint.TestCase index 28d539a0..8255957c 100755 --- a/tests/lint.TestCase +++ b/tests/lint.TestCase @@ -118,6 +118,8 @@ class LintTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal") diff --git a/tests/metadata.TestCase b/tests/metadata.TestCase index 247f6a89..6078ade0 100755 --- a/tests/metadata.TestCase +++ b/tests/metadata.TestCase @@ -141,6 +141,8 @@ class MetadataTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal") diff --git a/tests/publish.TestCase b/tests/publish.TestCase index b02ece99..2e658c1e 100755 --- a/tests/publish.TestCase +++ b/tests/publish.TestCase @@ -162,6 +162,8 @@ class PublishTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal") diff --git a/tests/scanner.TestCase b/tests/scanner.TestCase index b0d2dc52..6e41b905 100755 --- a/tests/scanner.TestCase +++ b/tests/scanner.TestCase @@ -39,6 +39,8 @@ class ScannerTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal") diff --git a/tests/signatures.TestCase b/tests/signatures.TestCase index a019da95..b6af0eb5 100755 --- a/tests/signatures.TestCase +++ b/tests/signatures.TestCase @@ -57,6 +57,8 @@ class SignaturesTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal")