File: ignore_pylint_file.diff

package info (click to toggle)
python-dlt 2.0-3
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 516 kB
  • sloc: python: 2,244; makefile: 45
file content (20 lines) | stat: -rw-r--r-- 761 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Ignoring pylint test as codestyle is repo issue
--- a/tests/static_check_tests.py
+++ b/tests/static_check_tests.py
@@ -4,6 +4,7 @@
 import os
 import unittest

+from nose import SkipTest
 from nose.tools import assert_equal

 from dlt import run_command
@@ -34,6 +35,8 @@
         assert_equal(return_code, 0, "Stdout: {}\nStderr: {}".format(stdout, stderr))

     def test_check_pylint(self):
+        if not os.path.exists("setup.cfg"):
+            raise SkipTest("Runnin in package - skipping pylint")
         command = [os.path.join(self.prefix_path, "pylint"), "--rcfile", "setup.cfg", "dlt"]
         stdout, stderr, return_code = run_command(command, shell=False)
         assert_equal(return_code, 0, "Stdout: {}\nStderr: {}".format(stdout, stderr))