MCPcopy Index your code
hub / github.com/python/cpython / test_relativedir_bug46421

Method test_relativedir_bug46421

Lib/test/test_cmd_line.py:223–231  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

221 self.assertEqual(proc.returncode, 0)
222
223 def test_relativedir_bug46421(self):
224 # Test `python -m unittest` with a relative directory beginning with ./
225 # Note: We have to switch to the project's top module's directory, as per
226 # the python unittest wiki. We will switch back when we are done.
227 projectlibpath = os.path.dirname(__file__).removesuffix("test")
228 with os_helper.change_cwd(projectlibpath):
229 # Testing with and without ./
230 assert_python_ok('-m', 'unittest', "test/test_longexp.py")
231 assert_python_ok('-m', 'unittest', "./test/test_longexp.py")
232
233 def test_run_code(self):
234 # Test expected operation of the '-c' switch

Callers

nothing calls this directly

Calls 3

assert_python_okFunction · 0.90
removesuffixMethod · 0.45
dirnameMethod · 0.45

Tested by

no test coverage detected