Esempio n. 1
0
def test_refuses_readme():
    with local.cwd(local.cwd / context.module_name):
        for ext in ['.py', '.doc', '.mp3']:
            path = 'README{0}'.format(ext)
            open(path, 'w')
            with pytest.raises(exceptions.ProbeException):
                probe.has_readme()
            os.remove(path)
Esempio n. 2
0
def test_refuses_readme():
    with CliRunner().isolated_filesystem():
        for ext in ['.py', '.doc', '.mp3']:
            path = 'README{0}'.format(ext)
            open(path, 'w')
            with pytest.raises(exceptions.ProbeException):
                probe.has_readme()
            os.remove(path)
Esempio n. 3
0
def test_refuses_readme():
    with local.cwd(local.cwd / context.module_name):
        for ext in ['.py', '.doc', '.mp3']:
            path = 'README{0}'.format(ext)
            open(path, 'w')
            with pytest.raises(exceptions.ProbeException):
                probe.has_readme()
            os.remove(path)
Esempio n. 4
0
def test_accepts_readme():
    with local.cwd(local.cwd / context.module_name):
        for ext in probe.README_EXTENSIONS:
            path = 'README{0}'.format(ext)
            open(path, 'w')
            assert probe.has_readme()
            os.remove(path)
Esempio n. 5
0
def test_accepts_readme():
    with local.cwd(local.cwd / context.module_name):
        for ext in probe.README_EXTENSIONS:
            path = 'README{0}'.format(ext)
            open(path, 'w')
            assert probe.has_readme()
            os.remove(path)
Esempio n. 6
0
def test_fails_for_missing_readme():
    with local.cwd(local.cwd / context.module_name):
        for i in glob.glob('README*'):
            os.remove(i)
        with pytest.raises(exceptions.ProbeException):
            probe.has_readme()
Esempio n. 7
0
def test_fails_for_missing_readme(python_module):
    with CliRunner().isolated_filesystem():
        with pytest.raises(exceptions.ProbeException):
            probe.has_readme()
Esempio n. 8
0
def test_accepts_readme(python_module):
    for ext in probe.README_EXTENSIONS:
        path = 'README{0}'.format(ext)
        open(path, 'w')
        assert probe.has_readme()
        os.remove(path)
Esempio n. 9
0
def test_fails_for_missing_readme():
    with local.cwd(local.cwd / context.module_name):
        for i in glob.glob('README*'):
            os.remove(i)
        with pytest.raises(exceptions.ProbeException):
            probe.has_readme()