def test_platform_pypy(self): with mock.platform_pyimp(): with mock.sys_platform('darwin'): with mock.pypy_version((1, 4, 3)): self.assertIn('PyPy', pyimplementation()) with mock.pypy_version((1, 4, 3, 'a4')): self.assertIn('PyPy', pyimplementation())
def test_platform_fallback(self): with mock.platform_pyimp(): with mock.sys_platform('darwin'): with mock.pypy_version(): self.assertEqual('CPython', pyimplementation())