We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94c7dfe commit 24edddaCopy full SHA for 24eddda
pytest_watch/__main__.py
@@ -12,6 +12,7 @@
12
def run_cli():
13
import os
14
import sys
15
+
16
sys.path.append(os.path.dirname(__file__))
17
18
from pytest_watch.command import main
pytest_watch/tests/test_main.py
@@ -0,0 +1,20 @@
1
+import os
2
+import sys
3
+import unittest
4
5
+try:
6
+ from unittest.mock import patch
7
+except ImportError:
8
+ from mock import patch
9
10
+from pytest_watch import __main__
11
+from pytest_watch.__main__ import run_cli
+class TestRunCLI(unittest.TestCase):
+ @patch("pytest_watch.command.main", side_effect=lambda argv: 0)
+ def test_add_pytest_watch_folder_to_path(self, main):
+ run_cli()
19
+ self.assertIn(os.path.dirname(__main__.__file__), sys.path)
20
0 commit comments