MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_relativedir_bug46421

Method test_relativedir_bug46421

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

Source from the content-addressed store, hash-verified

185 self.assertTrue(data.find(b'__main__.Timer') != -1)
186
187 def test_relativedir_bug46421(self):
188 # Test `python -m unittest` with a relative directory beginning with ./
189 # Note: We have to switch to the project's top module's directory, as per
190 # the python unittest wiki. We will switch back when we are done.
191 projectlibpath = os.path.dirname(__file__).removesuffix("test")
192 with os_helper.change_cwd(projectlibpath):
193 # Testing with and without ./
194 assert_python_ok('-m', 'unittest', "test/test_longexp.py")
195 assert_python_ok('-m', 'unittest', "./test/test_longexp.py")
196
197 def test_run_code(self):
198 # Test expected operation of the '-c' switch

Callers

nothing calls this directly

Calls 2

assert_python_okFunction · 0.90
removesuffixMethod · 0.45

Tested by

no test coverage detected