Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2018 14:01:10 +0000 (UTC)
From:      "Carlos J. Puga Medina" <cpm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458528 - in head/devel/py-codecov: . files
Message-ID:  <201801091401.w09E1Ah9018940@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cpm
Date: Tue Jan  9 14:01:10 2018
New Revision: 458528
URL: https://svnweb.freebsd.org/changeset/ports/458528

Log:
  devel/py-codecov: update to 2.0.13
  
  Changelog: https://github.com/codecov/codecov-python/blob/master/CHANGELOG.md

Modified:
  head/devel/py-codecov/Makefile
  head/devel/py-codecov/distinfo
  head/devel/py-codecov/files/patch-tests_test.py

Modified: head/devel/py-codecov/Makefile
==============================================================================
--- head/devel/py-codecov/Makefile	Tue Jan  9 13:09:47 2018	(r458527)
+++ head/devel/py-codecov/Makefile	Tue Jan  9 14:01:10 2018	(r458528)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	codecov
-PORTVERSION=	2.0.10
+PORTVERSION=	2.0.13
 DISTVERSIONPREFIX=	v
 CATEGORIES=	devel python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

Modified: head/devel/py-codecov/distinfo
==============================================================================
--- head/devel/py-codecov/distinfo	Tue Jan  9 13:09:47 2018	(r458527)
+++ head/devel/py-codecov/distinfo	Tue Jan  9 14:01:10 2018	(r458528)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1512663111
-SHA256 (codecov-codecov-python-v2.0.10_GH0.tar.gz) = c4d6fb072e6bbc8346d8d530ee6c837b9917ee134e20c33704535c425431fea7
-SIZE (codecov-codecov-python-v2.0.10_GH0.tar.gz) = 22183
+TIMESTAMP = 1515502800
+SHA256 (codecov-codecov-python-v2.0.13_GH0.tar.gz) = c73fded3149c2bd97c32a476fa037644976e9785e20d35959a2a736b01a970b8
+SIZE (codecov-codecov-python-v2.0.13_GH0.tar.gz) = 22481

Modified: head/devel/py-codecov/files/patch-tests_test.py
==============================================================================
--- head/devel/py-codecov/files/patch-tests_test.py	Tue Jan  9 13:09:47 2018	(r458527)
+++ head/devel/py-codecov/files/patch-tests_test.py	Tue Jan  9 14:01:10 2018	(r458528)
@@ -1,137 +1,20 @@
-# The following test cases fails because the .git directory is not included. 
-# Remove them for now until the reported issue #100 is fixed.
-# https://github.com/codecov/codecov-python/issues/100
-
---- tests/test.py.orig	2017-04-28 14:06:12 UTC
+--- tests/test.py.orig	2018-01-08 10:57:15 UTC
 +++ tests/test.py
-@@ -2,9 +2,9 @@ import os
- import sys
- import pickle
- import itertools
-+import unittest
- from ddt import ddt, data
- from mock import patch, Mock
--import unittest2 as unittest
- 
- import subprocess
- 
-@@ -134,21 +134,6 @@ class TestUploader(unittest.TestCase):
+@@ -134,7 +134,7 @@ class TestUploader(unittest.TestCase):
                  self.assertEqual(codecov.main(), None)
                  assert post.called and put.called
  
--    def test_send(self):
--        with patch('requests.post') as post:
--            with patch('requests.put') as put:
--                post.return_value = Mock(status_code=200, text='target\ns3')
--                put.return_value = Mock(status_code=200)
--                with open(self.filepath, 'w+') as f:
--                    f.write('coverage data')
--                res = self.run_cli(False, commit='a'*40, branch='master', token='<token>')
--                self.assertEqual(res['result'].strip(), 'target')
--                assert 'https://codecov.io/upload/v4?' in post.call_args[0][0]
--                assert 'commit=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' in post.call_args[0][0]
--                assert 'token=%3Ctoken%3E' in post.call_args[0][0]
--                assert 'branch=master' in post.call_args[0][0]
--                assert 'tests/test.py' in put.call_args[1]['data']
--
-     def test_send_error(self):
+-    @unittest.skipIf(os.getenv('CI') == "True" and os.getenv('APPVEYOR') == 'True', 'Skip AppVeyor CI test')
++    @unittest.skipIf(sys.platform.startswith('freebsd'),'Skip test')
+     def test_send(self):
          with patch('requests.post') as post:
-             post.return_value = Mock(status_code=400, text='error')
-@@ -181,18 +166,6 @@ class TestUploader(unittest.TestCase):
-         res = self.run_cli(token='@'+self.token, commit='a', branch='b')
-         self.assertIn('token=a', res['urlargs'])
- 
--    def test_bowerrc(self):
--        with open(self.bowerrc, 'w+') as f:
--            f.write('{"directory": "tests"}')
--        with open(self.filepath, 'w+') as f:
--            f.write('coverage data')
--        try:
--            self.run_cli(**self.defaults)
--        except AssertionError as e:
--            self.assertEqual(str(e),  "No coverage report found")
--        else:
--            raise Exception("Did not raise AssertionError")
--
-     def test_disable_search(self):
-         self.fake_report()
-         try:
-@@ -246,33 +219,6 @@ class TestUploader(unittest.TestCase):
+             with patch('requests.put') as put:
+@@ -249,7 +249,7 @@ class TestUploader(unittest.TestCase):
          else:
              raise Exception("Did not raise AssertionError")
  
--    def test_bowerrc_none(self):
--        with open(self.bowerrc, 'w+') as f:
--            f.write('{"other_key": "tests"}')
--        with open(self.filepath, 'w+') as f:
--            f.write('coverage data')
--        res = self.run_cli(**self.defaults)
--        self.assertIn('tests/test.py', res['reports'])
--
--    def test_discovers(self):
--        with open(self.jacoco, 'w+') as f:
--            f.write('<jacoco></jacoco>')
--        with open(self.filepath, 'w+') as f:
--            f.write('coverage data')
--        res = self.run_cli(**self.defaults)
--        self.assertIn('coverage.xml', res['reports'])
--        self.assertIn('coverage data', res['reports'])
--        self.assertIn('jacoco.xml', res['reports'])
--        self.assertIn('<jacoco></jacoco>', res['reports'])
--
--    def test_not_jacoco(self):
--        with open(self.filepath, 'w+') as f:
--            f.write('<data>')
--        res = self.run_cli(file='tests/coverage.xml', **self.defaults)
--        res = res['reports'].split('<<<<<< network\n')[1].splitlines()
--        self.assertEqual(res[0], '# path=tests/coverage.xml')
--        self.assertEqual(res[1], '<data>')
--
-     def test_run_coverage(self):
-         self.skipTest('Not sure how to pull off atm')
-         with open(self.coverage, 'w+') as f:
-@@ -339,23 +285,6 @@ class TestUploader(unittest.TestCase):
-         self.assertEqual(res['query']['branch'], 'master')
-         self.assertEqual(res['codecov'].token, 'token')
- 
--    def test_ci_jenkins_blue_ocean(self):
--        self.set_env(JENKINS_URL='https://....',
--                     BUILD_URL='https://....',
--                     BRANCH_NAME='master',
--                     CHANGE_ID='1',
--                     BUILD_NUMBER='41',
--                     CODECOV_TOKEN='token')
--        self.fake_report()
--        res = self.run_cli()
--        self.assertEqual(res['query']['service'], 'jenkins')
--        self.assertEqual(res['query']['commit'], codecov.check_output(("git", "rev-parse", "HEAD")))
--        self.assertEqual(res['query']['build'], '41')
--        self.assertEqual(res['query']['build_url'], 'https://....')
--        self.assertEqual(res['query']['pr'], '1')
--        self.assertEqual(res['query']['branch'], 'master')
--        self.assertEqual(res['codecov'].token, 'token')
--
-     def test_ci_travis(self):
-         self.set_env(TRAVIS="true",
-                      TRAVIS_BRANCH="master",
-@@ -459,20 +388,6 @@ class TestUploader(unittest.TestCase):
-         self.assertEqual(res['query']['build'], '10')
-         self.assertEqual(res['query']['pr'], '10')
-         self.assertEqual(res['query']['job'], 'default')
--        self.assertEqual(res['codecov'].token, 'token')
--
--    def test_ci_drone(self):
--        self.set_env(DRONE='true',
--                     DRONE_BUILD_NUMBER='10',
--                     DRONE_BRANCH='master',
--                     DRONE_BUILD_URL='https://drone.io/github/builds/1',
--                     CODECOV_TOKEN='token')
--        self.fake_report()
--        res = self.run_cli()
--        self.assertEqual(res['query']['service'], 'drone.io')
--        self.assertEqual(res['query']['commit'], codecov.check_output(("git", "rev-parse", "HEAD")))
--        self.assertEqual(res['query']['build'], '10')
--        self.assertEqual(res['query']['build_url'], 'https://drone.io/github/builds/1')
-         self.assertEqual(res['codecov'].token, 'token')
- 
-     def test_ci_shippable(self):
+-    @unittest.skipIf(os.getenv('CI') == "True" and os.getenv('APPVEYOR') == 'True', 'Skip AppVeyor CI test')
++    @unittest.skipIf(sys.platform.startswith('freebsd'),'Skip test')
+     def test_bowerrc_none(self):
+         with open(self.bowerrc, 'w+') as f:
+             f.write('{"other_key": "tests"}')



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801091401.w09E1Ah9018940>