diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 000000000..ac0927787 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,5 @@ +languages: + Python: true + +exclude_paths: + - tests/ diff --git a/tests/test_data_file_obj.py b/tests/test_data_file_obj.py index 95dc79cbb..10702e7e0 100644 --- a/tests/test_data_file_obj.py +++ b/tests/test_data_file_obj.py @@ -17,11 +17,15 @@ class BasicDataDirTest(TestCase): if curr_dir: self._curr_dir = os.path.realpath(curr_dir) - os.makedirs(self._curr_dir, exist_ok=True) else: self._curr_dir = self._test_git_dir - os.makedirs(self._test_git_dir, exist_ok=True) + if not os.path.exists(self._curr_dir): + os.makedirs(self._curr_dir) + + if not os.path.isdir(self._test_git_dir): + os.makedirs(self._test_git_dir) + os.chdir(self._curr_dir) def tearDown(self): diff --git a/tests/test_git_wrapper.py b/tests/test_git_wrapper.py deleted file mode 100644 index b109150d4..000000000 --- a/tests/test_git_wrapper.py +++ /dev/null @@ -1,6 +0,0 @@ -from unittest import TestCase - - -class TestGitWrapper(TestCase): - def test1(self): - pass diff --git a/unittests.sh b/unittests.sh new file mode 100755 index 000000000..a705f191f --- /dev/null +++ b/unittests.sh @@ -0,0 +1,4 @@ + +python -m unittest discover --pattern=*.py +coverage report --include 'neatlynx*' +CODECLIMATE_REPO_TOKEN=a668a3d02db00ab993ad82e1b3d5d2eb00c3c2e26e659153ae4cfd2f12aaad23 codeclimate-test-reporter --include 'neatlynx*'