示例#1
0
 def testInvalidVersionNumber(self, capsys, monkeypatch, prefix, suffix):
     def mockreturn(abbrev):
             return '%s0.0.0%s' % (prefix, suffix)
     import yaclifw.version
     monkeypatch.setattr(yaclifw.version, 'call_git_describe', mockreturn)
     with pytest.raises(ValueError):
         get_git_version(module_file)
示例#2
0
    def testInvalidVersionNumber(self, capsys, monkeypatch, prefix, suffix):
        def mockreturn(abbrev):
            return '%s0.0.0%s' % (prefix, suffix)

        import yaclifw.version
        monkeypatch.setattr(yaclifw.version, 'call_git_describe', mockreturn)
        with pytest.raises(ValueError):
            get_git_version(module_file)
示例#3
0
 def testVersionNumber(self, capsys, monkeypatch, prefix, suffix):
     def mockreturn(abbrev):
             return '%s0.0.0%s' % (prefix, suffix)
     import yaclifw.version
     monkeypatch.setattr(yaclifw.version, 'call_git_describe', mockreturn)
     version = get_git_version(module_file)
     assert version == '0.0.0%s' % suffix
示例#4
0
    def testVersionNumber(self, capsys, monkeypatch, prefix, suffix):
        def mockreturn(abbrev):
            return '%s0.0.0%s' % (prefix, suffix)

        import yaclifw.version
        monkeypatch.setattr(yaclifw.version, 'call_git_describe', mockreturn)
        version = get_git_version(module_file)
        assert version == '0.0.0%s' % suffix
示例#5
0
            self.test_args.extend(['--junitxml', self.junitxml])
        if self.pdb:
            self.test_args.extend(['--pdb'])
        self.test_suite = True

    def run_tests(self):
        # import here, cause outside the eggs aren't loaded
        import pytest
        errno = pytest.main(self.test_args)
        sys.exit(errno)


try:
    from yaclifw.version import get_git_version
    from scc import __file__ as module_file
    VERSION = get_git_version(module_file)
except ImportError:
    VERSION = "UNKNOWN"

ZIP_SAFE = False

LONG_DESCRIPTION = open("README.rst", "r").read()

CLASSIFIERS = [
    "Development Status :: 4 - Beta", "Environment :: Console",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: GNU General Public License v2"
    " (GPLv2)", "Operating System :: OS Independent",
    "Programming Language :: Python",
    "Topic :: Software Development :: Version Control"
]
示例#6
0
 def testVersionOutput(self, capsys):
     main("test", ["version"], items=[("version", Version)])
     out, err = capsys.readouterr()
     assert out.rstrip() == get_git_version(module_file)
示例#7
0
文件: setup.py 项目: manics/yaclifw
            self.test_args.extend(['-v'])
        if self.test_quiet:
            self.test_args.extend(['-q'])
        if self.junitxml is not None:
            self.test_args.extend(['--junitxml', self.junitxml])
        if self.pdb:
            self.test_args.extend(['--pdb'])
        self.test_suite = True

    def run_tests(self):
        # import here, cause outside the eggs aren't loaded
        import pytest
        errno = pytest.main(self.test_args)
        sys.exit(errno)

VERSION = get_git_version(module_file)
ZIP_SAFE = False

LONG_DESCRIPTION = open("README.rst", "r").read()

CLASSIFIERS = ["Development Status :: 4 - Beta",
               "Environment :: Console",
               "Intended Audience :: Developers",
               "License :: OSI Approved :: GNU General Public License v2"
               " (GPLv2)",
               "Operating System :: OS Independent",
               "Programming Language :: Python",
               "Topic :: Software Development :: Version Control"]

setup(name='yaclifw',
示例#8
0
 def testVersionOutput(self, capsys):
     main("test", ["version"], items=[("version", Version)])
     out, err = capsys.readouterr()
     assert out.rstrip() == get_git_version(module_file)