Ejemplo n.º 1
0
def test_copy_wrong_platform(tmpdir):
    tmpdir = str(tmpdir)
    with pytest.raises(ExtensionModuleMismatch, match="will not be usable on Windows"):
        copy_modules(['unix_extmod'], tmpdir, '3.3.5', sample_path)

    with pytest.raises(ExtensionModuleMismatch, match="will not be usable on Windows"):
        copy_modules(['unix_extpkg'], tmpdir, '3.3.5', sample_path)
Ejemplo n.º 2
0
 def test_copy_from_zipfile(self):
     copy_modules(['zippedmod2', 'zippedpkg2'], self.target, running_python,
                  sample_path)
     #        assert_is_file(pjoin(self.target, 'zippedmod.py'))
     #        assert_is_dir(pjoin(self.target, 'zippedpkg'))
     assert_is_file(pjoin(self.target, 'zippedmod2.py'))
     assert_is_dir(pjoin(self.target, 'zippedpkg2'))
Ejemplo n.º 3
0
def test_copy_wrong_pyversion(tmpdir):
    tmpdir = str(tmpdir)
    with pytest.raises(ExtensionModuleMismatch, match="on Python 4"):
        copy_modules(['win_extpkg'], tmpdir, '4.0.0', sample_path)

    with pytest.raises(ExtensionModuleMismatch, match="on Python 4"):
        copy_modules(['win_extmod'], tmpdir, '4.0.0', sample_path)
Ejemplo n.º 4
0
    def test_copy_from_zipfile(self):
        copy_modules(['zippedmod2','zippedpkg2'],
                     self.target, running_python, sample_path)
#        assert_is_file(pjoin(self.target, 'zippedmod.py'))
#        assert_is_dir(pjoin(self.target, 'zippedpkg'))
        assert_is_file(pjoin(self.target, 'zippedmod2.py'))
        assert_is_dir(pjoin(self.target, 'zippedpkg2'))
Ejemplo n.º 5
0
def test_copy_wrong_pyversion(tmpdir):
    tmpdir = str(tmpdir)
    with pytest.raises(ExtensionModuleMismatch, match="on Python 4"):
        copy_modules(['win_extpkg'], tmpdir, '4.0.0', sample_path)

    with pytest.raises(ExtensionModuleMismatch, match="on Python 4"):
        copy_modules(['win_extmod'], tmpdir, '4.0.0', sample_path)
Ejemplo n.º 6
0
def test_copy_from_zipfile(tmpdir):
    tmpdir = str(tmpdir)
    copy_modules(['zippedmod2', 'zippedpkg2'],
                 tmpdir, running_python, sample_path)
#        assert_isfile(pjoin(tmpdir, 'zippedmod.py'))
#        assert_isdir(pjoin(tmpdir, 'zippedpkg'))
    assert_isfile(pjoin(tmpdir, 'zippedmod2.py'))
    assert_isdir(pjoin(tmpdir, 'zippedpkg2'))
Ejemplo n.º 7
0
def test_copy_from_zipfile(tmpdir):
    tmpdir = str(tmpdir)
    copy_modules(['zippedmod2', 'zippedpkg2'], tmpdir, running_python,
                 sample_path)
    #        assert_isfile(pjoin(tmpdir, 'zippedmod.py'))
    #        assert_isdir(pjoin(tmpdir, 'zippedpkg'))
    assert_isfile(pjoin(tmpdir, 'zippedmod2.py'))
    assert_isdir(pjoin(tmpdir, 'zippedpkg2'))
Ejemplo n.º 8
0
    def test_copy_wrong_platform(self):
        with self.assertRaisesRegexp(ExtensionModuleMismatch,
                                     "will not be usable on Windows"):
            copy_modules(['unix_extmod'], self.target, '3.3.5', sample_path)

        with self.assertRaisesRegexp(ExtensionModuleMismatch,
                                     "will not be usable on Windows"):
            copy_modules(['unix_extpkg'], self.target, '3.3.5', sample_path)
Ejemplo n.º 9
0
def test_copy_wrong_platform(tmpdir):
    tmpdir = str(tmpdir)
    with pytest.raises(ExtensionModuleMismatch,
                       match="will not be usable on Windows"):
        copy_modules(['unix_extmod'], tmpdir, '3.3.5', sample_path)

    with pytest.raises(ExtensionModuleMismatch,
                       match="will not be usable on Windows"):
        copy_modules(['unix_extpkg'], tmpdir, '3.3.5', sample_path)
Ejemplo n.º 10
0
def test_module_not_found(tmpdir):
    tmpdir = str(tmpdir)
    with pytest.raises(ImportError):
        copy_modules(['nonexistant'], tmpdir, '3.3.5', sample_path)
Ejemplo n.º 11
0
 def test_copy_plain(self):
     copy_modules(['plainmod', 'plainpkg'], self.target, '3.3.5',
                  sample_path)
     assert_is_file(pjoin(self.target, 'plainmod.py'))
     assert_is_dir(pjoin(self.target, 'plainpkg'))
Ejemplo n.º 12
0
 def test_module_not_found(self):
     with self.assertRaises(ImportError):
         copy_modules(['nonexistant'], self.target, '3.3.5', sample_path)
Ejemplo n.º 13
0
def test_copy_windows(tmpdir):
    tmpdir = str(tmpdir)
    copy_modules(['win_extmod', 'win_extpkg'], tmpdir, running_python, sample_path)
    assert_isfile(pjoin(tmpdir, 'win_extmod.pyd'))
    assert_isdir(pjoin(tmpdir, 'win_extpkg'))
Ejemplo n.º 14
0
 def test_copy_wrong_pyversion(self):
     with self.assertRaisesRegexp(ExtensionModuleMismatch, "on Python 4"):
         copy_modules(['win_extpkg'], self.target, '4.0.0', sample_path)
     
     with self.assertRaisesRegexp(ExtensionModuleMismatch, "on Python 4"):
         copy_modules(['win_extmod'], self.target, '4.0.0', sample_path)
Ejemplo n.º 15
0
 def test_copy_windows(self):
     copy_modules(['win_extmod', 'win_extpkg'], self.target, running_python, sample_path)
     assert_is_file(pjoin(self.target, 'win_extmod.pyd'))
     assert_is_dir(pjoin(self.target, 'win_extpkg'))
Ejemplo n.º 16
0
 def test_copy_wrong_platform(self):
     with self.assertRaisesRegexp(ExtensionModuleMismatch, "will not be usable on Windows"):
         copy_modules(['unix_extmod'], self.target, '3.3.5', sample_path)
     
     with self.assertRaisesRegexp(ExtensionModuleMismatch, "will not be usable on Windows"):
         copy_modules(['unix_extpkg'], self.target, '3.3.5', sample_path)
Ejemplo n.º 17
0
def test_module_not_found(tmpdir):
    tmpdir = str(tmpdir)
    with pytest.raises(ImportError):
        copy_modules(['nonexistant'], tmpdir, '3.3.5', sample_path)
Ejemplo n.º 18
0
def test_copy_plain(tmpdir):
    tmpdir = str(tmpdir)
    copy_modules(['plainmod', 'plainpkg'], tmpdir, '3.3.5', sample_path)
    assert_isfile(pjoin(tmpdir, 'plainmod.py'))
    assert_isdir(pjoin(tmpdir, 'plainpkg'))
Ejemplo n.º 19
0
 def test_copy_windows(self):
     copy_modules(['win_extmod', 'win_extpkg'], self.target, running_python,
                  sample_path)
     assert_is_file(pjoin(self.target, 'win_extmod.pyd'))
     assert_is_dir(pjoin(self.target, 'win_extpkg'))
Ejemplo n.º 20
0
def test_copy_windows(tmpdir):
    tmpdir = str(tmpdir)
    copy_modules(['win_extmod', 'win_extpkg'], tmpdir, running_python,
                 sample_path)
    assert_isfile(pjoin(tmpdir, 'win_extmod.pyd'))
    assert_isdir(pjoin(tmpdir, 'win_extpkg'))
Ejemplo n.º 21
0
    def test_copy_wrong_pyversion(self):
        with self.assertRaisesRegexp(ExtensionModuleMismatch, "on Python 4"):
            copy_modules(['win_extpkg'], self.target, '4.0.0', sample_path)

        with self.assertRaisesRegexp(ExtensionModuleMismatch, "on Python 4"):
            copy_modules(['win_extmod'], self.target, '4.0.0', sample_path)
Ejemplo n.º 22
0
 def test_copy_plain(self):
     copy_modules(['plainmod', 'plainpkg'], self.target, '3.3.5', sample_path)
     assert_is_file(pjoin(self.target, 'plainmod.py'))
     assert_is_dir(pjoin(self.target, 'plainpkg'))
Ejemplo n.º 23
0
 def test_module_not_found(self):
     with self.assertRaises(ImportError):
         copy_modules(['nonexistant'], self.target, '3.3.5', sample_path)
Ejemplo n.º 24
0
def test_copy_plain(tmpdir):
    tmpdir = str(tmpdir)
    copy_modules(['plainmod', 'plainpkg'], tmpdir, '3.3.5', sample_path)
    assert_isfile(pjoin(tmpdir, 'plainmod.py'))
    assert_isdir(pjoin(tmpdir, 'plainpkg'))