From b7722a81bcd33b9a2a924bc70079b851e2cbed9a Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 1 May 2021 12:15:57 +0900 Subject: [PATCH 01/26] Enable CI --- python-pycotap.spec | 5 ++++- tests/tests.py | 53 +++++++++++++++++++++++++++++++++++++++++++++ tests/tests.yml | 13 +++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100755 tests/tests.py create mode 100644 tests/tests.yml diff --git a/python-pycotap.spec b/python-pycotap.spec index 8bc96c7..434e67d 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Sat May 01 2021 Takao Fujiwara - 1.1.0-9 +- Enable CI + * Wed Jan 27 2021 Fedora Release Engineering - 1.1.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/tests/tests.py b/tests/tests.py new file mode 100755 index 0000000..8c08d32 --- /dev/null +++ b/tests/tests.py @@ -0,0 +1,53 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +from __future__ import print_function + +import sys +import unittest + +# Need to flush the output against Gtk.main() +def printflush(sentence): + try: + print(sentence, flush=True) + except IOError: + pass + +def printerr(sentence): + try: + print(sentence, flush=True, file=sys.stderr) + except IOError: + pass + +from pycotap import TAPTestRunner +from pycotap import LogMode +printflush('## Load pycotap') + + +class AnthyTest(unittest.TestCase): + __test_index = 0 + + @classmethod + def setUpClass(cls): + printflush('## setUpclass done') + cls.__test_index += 1 + + def setUp(self): + self.__test_index += 1 + printflush('## setUp done') + + def test_case1(self): + if self.__test_index != 2: + with self.subTest(i = self.__test_index): + self.fail('setUp does not run: ' + error.message) + printflush('## Test done %d' % self.__test_index) + + +def main(): + loader = unittest.TestLoader() + # Log should be in stderr instead of StringIO + runner = TAPTestRunner(test_output_log=LogMode.LogToError) + unittest.main(testRunner=runner, testLoader=loader) + +if __name__ == '__main__': + main() diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..22f5154 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,13 @@ +- hosts: localhost + tags: + - classic + roles: + - role: standard-test-basic + #- role: standard-test-beakerlib + required_packages: + - python3-pycotap + tests: + - smoke1: + dir: . + run: ./tests.py + From 5a7f8cc783baf6fadfc33aa0db17e3e3b8644dd7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:52:44 +0200 Subject: [PATCH 02/26] Rebuilt for Python 3.10 --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 434e67d..b125487 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jun 04 2021 Python Maint - 1.1.0-10 +- Rebuilt for Python 3.10 + * Sat May 01 2021 Takao Fujiwara - 1.1.0-9 - Enable CI From aaf2101233a027db3968ec7c063c6eb2d7998630 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 08:29:47 +0000 Subject: [PATCH 03/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index b125487..5f4c547 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.1.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jun 04 2021 Python Maint - 1.1.0-10 - Rebuilt for Python 3.10 From c313e39bed617e61354de2495af168abd4ce4b6e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 14:26:40 +0000 Subject: [PATCH 04/26] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 5f4c547..96b95c8 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 1.1.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 1.1.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From b0502d4b103f6441ec1b323a377950a7a7d043c7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 15:14:55 +0200 Subject: [PATCH 05/26] Rebuilt for Python 3.11 --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 96b95c8..5e639ba 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Mon Jun 13 2022 Python Maint - 1.1.0-13 +- Rebuilt for Python 3.11 + * Fri Jan 21 2022 Fedora Release Engineering - 1.1.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From b4a28133f24827f18232e2d5e577bd8bc97c9061 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 21:09:33 +0000 Subject: [PATCH 06/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 5e639ba..18fb4a4 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 13%{?dist} +Release: 14%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 1.1.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 1.1.0-13 - Rebuilt for Python 3.11 From c605f8430fae939b7f69748023b93acd274a9460 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 15:58:57 +0000 Subject: [PATCH 07/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 18fb4a4..c0ce80d 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 14%{?dist} +Release: 15%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 1.1.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Jul 22 2022 Fedora Release Engineering - 1.1.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 7ec4001d1d275dede34ade2a223d023592b8ad75 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 20:48:45 +0200 Subject: [PATCH 08/26] Rebuilt for Python 3.12 --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index c0ce80d..d1c9fbe 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 15%{?dist} +Release: 16%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Tue Jun 13 2023 Python Maint - 1.1.0-16 +- Rebuilt for Python 3.12 + * Fri Jan 20 2023 Fedora Release Engineering - 1.1.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 54db8c6f1ce07ad3497938b900a925c9726b6dca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 12:37:42 +0000 Subject: [PATCH 09/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index d1c9fbe..add86e2 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 16%{?dist} +Release: 17%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 1.1.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jun 13 2023 Python Maint - 1.1.0-16 - Rebuilt for Python 3.12 From 00210b63596be5600d2494bdd005e1196ed02e6d Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Mon, 21 Aug 2023 10:12:13 +0530 Subject: [PATCH 10/26] Mark this as SPDX license expression converted --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index add86e2..5045fac 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 17%{?dist} +Release: 18%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Mon Aug 21 2023 Parag Nemade - 1.1.0-18 +- Mark this as SPDX license expression converted + * Fri Jul 21 2023 Fedora Release Engineering - 1.1.0-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 6d391041b38a6a2bd134ad8cb67a08a1001c7da0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 05:25:45 +0000 Subject: [PATCH 11/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 5045fac..0af040d 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 18%{?dist} +Release: 19%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 1.1.0-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Aug 21 2023 Parag Nemade - 1.1.0-18 - Mark this as SPDX license expression converted From 32827d61458ff63328f3d4c55ff28cec5dc6ef3b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 08:26:05 +0000 Subject: [PATCH 12/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 0af040d..cae6cb6 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 19%{?dist} +Release: 20%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 1.1.0-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 1.1.0-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 022aa81efddfdc80b02d34b3578a141ef6f152b0 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 08:58:32 +0200 Subject: [PATCH 13/26] Rebuilt for Python 3.13 --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index cae6cb6..1f99894 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.1.0 -Release: 20%{?dist} +Release: 21%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -49,6 +49,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jun 07 2024 Python Maint - 1.1.0-21 +- Rebuilt for Python 3.13 + * Fri Jan 26 2024 Fedora Release Engineering - 1.1.0-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 778897daf8d54ca4b1bc34406fc9e240badd4b48 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Fri, 12 Jul 2024 13:31:24 +0300 Subject: [PATCH 14/26] New upstream release ( RHBZ#2297455 ) New upstream release ( https://bugzilla.redhat.com/show_bug.cgi?id=2297455 ) --- .gitignore | 1 + python-pycotap.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b7e1a35..0a2089f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /pycotap-1.1.0.tar.gz +/pycotap-1.3.1.tar.gz diff --git a/python-pycotap.spec b/python-pycotap.spec index 1f99894..21a2e87 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -2,8 +2,8 @@ %global pypi_name pycotap Name: python-%{pypi_name} -Version: 1.1.0 -Release: 21%{?dist} +Version: 1.3.1 +Release: 1%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -43,12 +43,16 @@ rm -rf %{pypi_name}.egg-info %install %py3_install find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' +%__rm -f %{buildroot}/usr/COPYING %files -n python3-%{pypi_name} %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 12 2024 Shlomi Fish 1.3.1-1 +- New upstream release ( https://bugzilla.redhat.com/show_bug.cgi?id=2297455 ) + * Fri Jun 07 2024 Python Maint - 1.1.0-21 - Rebuilt for Python 3.13 diff --git a/sources b/sources index dccda8e..8f8a5f4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pycotap-1.1.0.tar.gz) = dbe8d76c3e4b934dd4ff9ec0d48caafef3ae5583046a7316607b3c8cebf8cb920c68dc46487243aac81823994805c76f2be8ff0cbda593c70b70f268661fa289 +SHA512 (pycotap-1.3.1.tar.gz) = e7d50340fb4e3f55037a96aaaba419e6753d4499564339b6562317455ed223c3fd93bf41d0bd9654c03a4bea09377daa192ca985bafc96983e4a2261dde348b8 From 9a8a210796bff0330fba21eb65fa5af4569a416b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 14:23:16 +0000 Subject: [PATCH 15/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 21a2e87..d1b493a 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.3.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -50,6 +50,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 1.3.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jul 12 2024 Shlomi Fish 1.3.1-1 - New upstream release ( https://bugzilla.redhat.com/show_bug.cgi?id=2297455 ) From 18333d7f240f50536b5aaf5872d84a31c84e7d1d Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 12 Oct 2024 01:22:26 +0900 Subject: [PATCH 16/26] Delete CI STI --- tests/tests.py | 53 ------------------------------------------------- tests/tests.yml | 13 ------------ 2 files changed, 66 deletions(-) delete mode 100755 tests/tests.py delete mode 100644 tests/tests.yml diff --git a/tests/tests.py b/tests/tests.py deleted file mode 100755 index 8c08d32..0000000 --- a/tests/tests.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*- - -from __future__ import print_function - -import sys -import unittest - -# Need to flush the output against Gtk.main() -def printflush(sentence): - try: - print(sentence, flush=True) - except IOError: - pass - -def printerr(sentence): - try: - print(sentence, flush=True, file=sys.stderr) - except IOError: - pass - -from pycotap import TAPTestRunner -from pycotap import LogMode -printflush('## Load pycotap') - - -class AnthyTest(unittest.TestCase): - __test_index = 0 - - @classmethod - def setUpClass(cls): - printflush('## setUpclass done') - cls.__test_index += 1 - - def setUp(self): - self.__test_index += 1 - printflush('## setUp done') - - def test_case1(self): - if self.__test_index != 2: - with self.subTest(i = self.__test_index): - self.fail('setUp does not run: ' + error.message) - printflush('## Test done %d' % self.__test_index) - - -def main(): - loader = unittest.TestLoader() - # Log should be in stderr instead of StringIO - runner = TAPTestRunner(test_output_log=LogMode.LogToError) - unittest.main(testRunner=runner, testLoader=loader) - -if __name__ == '__main__': - main() diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 22f5154..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,13 +0,0 @@ -- hosts: localhost - tags: - - classic - roles: - - role: standard-test-basic - #- role: standard-test-beakerlib - required_packages: - - python3-pycotap - tests: - - smoke1: - dir: . - run: ./tests.py - From 7f31276577006d994290e5838033eaf082180c63 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 12 Oct 2024 01:23:34 +0900 Subject: [PATCH 17/26] Add CI TMT --- .fmf/version | 1 + plans/test.fmf | 5 +++++ tests/base/main.fmf | 5 +++++ tests/base/test.py | 37 +++++++++++++++++++++++++++++++++++++ tests/base/test.sh | 9 +++++++++ 5 files changed, 57 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/test.fmf create mode 100644 tests/base/main.fmf create mode 100755 tests/base/test.py create mode 100755 tests/base/test.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/test.fmf b/plans/test.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/test.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/base/main.fmf b/tests/base/main.fmf new file mode 100644 index 0000000..d657f11 --- /dev/null +++ b/tests/base/main.fmf @@ -0,0 +1,5 @@ +summary: Simple test of python-pycotap +test: ./test.sh +framework: beakerlib +require: + - python3-pycotap diff --git a/tests/base/test.py b/tests/base/test.py new file mode 100755 index 0000000..4f6f6e2 --- /dev/null +++ b/tests/base/test.py @@ -0,0 +1,37 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + +import unittest +import sys + +from pycotap import TAPTestRunner +from pycotap import LogMode + + +class SimpleTest(unittest.TestCase): + @classmethod + def function_name(cls): + sys.stdout = sys.__stdout__ + return sys._getframe().f_back.f_code.co_name + + @classmethod + def setUpClass(cls): + print(cls.function_name()) + + def setUp(self): + print(SimpleTest.function_name()) + + def main(self): + print(SimpleTest.function_name()) + + def test_foo(self): + print(SimpleTest.function_name()) + + +def main(): + loader = unittest.TestLoader() + runner = TAPTestRunner(test_output_log=LogMode.LogToError) + unittest.main(testRunner=runner, testLoader=loader) + +if __name__ == '__main__': + main() diff --git a/tests/base/test.sh b/tests/base/test.sh new file mode 100755 index 0000000..b61d891 --- /dev/null +++ b/tests/base/test.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartTest + rlRun -t "./test.py" + rlPhaseEnd +rlJournalEnd From 488eb5dbbddb2416279fe7ba725ab00d881c6871 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sat, 12 Oct 2024 01:26:41 +0900 Subject: [PATCH 18/26] Rebuilt for CI --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index d1b493a..5a23611 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.3.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -50,6 +50,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Oct 11 2024 Takao Fujiwara 1.3.1-3 +- Rebuilt for CI + * Fri Jul 19 2024 Fedora Release Engineering - 1.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From cdc6c05e876eac47ac043abf908637ce1ba18f43 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 17:37:55 +0000 Subject: [PATCH 19/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 5a23611..7077753 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.3.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -50,6 +50,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 1.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Oct 11 2024 Takao Fujiwara 1.3.1-3 - Rebuilt for CI From 91ceded8a2600ec07b75e8ba1bf0d08241ea0ba3 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Thu, 13 Feb 2025 19:53:34 +0200 Subject: [PATCH 20/26] update stale URL --- python-pycotap.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 7077753..09518a1 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,11 +3,11 @@ Name: python-%{pypi_name} Version: 1.3.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT -URL: https://el-tramo.be/pycotap +URL: https://github.com/remko/pycotap Source0: %{pypi_source} BuildArch: noarch @@ -16,7 +16,7 @@ BuildRequires: python3dist(setuptools) %description pycotap is a simple Python test runner for unit tests that outputs Test Anything -Protocol results directly to standard output.Contrary to other TAP runners +Protocol results directly to standard output. Contrary to other TAP runners for Python, pycotap prints TAP (and *only* TAP) to standard output instead of to a separate file, allowing you to pipe it directly to TAP pretty printers and processors. @@ -27,7 +27,7 @@ Summary: %{summary} %description -n python3-%{pypi_name} pycotap is a simple Python test runner for unit tests that outputs Test Anything -Protocol results directly to standard output.Contrary to other TAP runners +Protocol results directly to standard output. Contrary to other TAP runners for Python, pycotap prints TAP (and *only* TAP) to standard output instead of to a separate file, allowing you to pipe it directly to TAP pretty printers and processors. @@ -50,6 +50,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Thu Feb 13 2025 Shlomi Fish 1.3.1-5 +- Update URL. + * Sat Jan 18 2025 Fedora Release Engineering - 1.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 8fd88ca7a2c4438702e9d18afaf13b81245a0037 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 20:35:25 +0200 Subject: [PATCH 21/26] Rebuilt for Python 3.14 --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 09518a1..7f0fe53 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -3,7 +3,7 @@ Name: python-%{pypi_name} Version: 1.3.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -50,6 +50,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Mon Jun 02 2025 Python Maint - 1.3.1-6 +- Rebuilt for Python 3.14 + * Thu Feb 13 2025 Shlomi Fish 1.3.1-5 - Update URL. From e5fa98bc82814bbcd74e6324f83106f4b9af8af0 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 9 Jul 2025 05:44:07 +0300 Subject: [PATCH 22/26] deprecated macros [ RHBZ#2378026 ] --- python-pycotap.spec | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 7f0fe53..86e055f 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -1,9 +1,8 @@ -# Created by pyp2rpm-3.3.2 %global pypi_name pycotap Name: python-%{pypi_name} Version: 1.3.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -12,7 +11,6 @@ Source0: %{pypi_source} BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3dist(setuptools) %description pycotap is a simple Python test runner for unit tests that outputs Test Anything @@ -23,7 +21,6 @@ printers and processors. %package -n python3-%{pypi_name} Summary: %{summary} -%{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} pycotap is a simple Python test runner for unit tests that outputs Test Anything @@ -34,22 +31,29 @@ printers and processors. %prep %autosetup -n %{pypi_name}-%{version} -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info + +%generate_buildrequires +%pyproject_buildrequires %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files %{pypi_name} find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %__rm -f %{buildroot}/usr/COPYING -%files -n python3-%{pypi_name} -%{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info +%check +%pyproject_check_import + +%files -n python3-%{pypi_name} -f %{pyproject_files} %changelog +======= +* Wed Jul 09 2025 Shlomi Fish 1.3.1-7 +- Stop using deprecated RPM macros ( https://bugzilla.redhat.com/show_bug.cgi?id=2378026 ) + * Mon Jun 02 2025 Python Maint - 1.3.1-6 - Rebuilt for Python 3.14 From 1afe2ec237ae6cba2728a365a044e6ac0d4046a0 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Wed, 9 Jul 2025 05:52:26 +0300 Subject: [PATCH 23/26] deprecated macros [ RHBZ#2378026 ] --- python-pycotap.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 86e055f..42f0ca1 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -50,7 +50,6 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %files -n python3-%{pypi_name} -f %{pyproject_files} %changelog -======= * Wed Jul 09 2025 Shlomi Fish 1.3.1-7 - Stop using deprecated RPM macros ( https://bugzilla.redhat.com/show_bug.cgi?id=2378026 ) From ec3fad94bf9265a9921a22df7165dc5efce4d684 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 09:33:21 +0000 Subject: [PATCH 24/26] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index 42f0ca1..d3182a9 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 1.3.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -50,6 +50,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %files -n python3-%{pypi_name} -f %{pyproject_files} %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 1.3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Jul 09 2025 Shlomi Fish 1.3.1-7 - Stop using deprecated RPM macros ( https://bugzilla.redhat.com/show_bug.cgi?id=2378026 ) From 2e0144badd269b070d2f8e2c23a767db50102c85 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 14:28:17 +0200 Subject: [PATCH 25/26] Rebuilt for Python 3.14.0rc2 bytecode --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index d3182a9..b0d4050 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 1.3.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -50,6 +50,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %files -n python3-%{pypi_name} -f %{pyproject_files} %changelog +* Fri Aug 15 2025 Python Maint - 1.3.1-9 +- Rebuilt for Python 3.14.0rc2 bytecode + * Fri Jul 25 2025 Fedora Release Engineering - 1.3.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 6be50fb74dc293b1421f411294a38c13c44edacc Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:03:58 +0200 Subject: [PATCH 26/26] Rebuilt for Python 3.14.0rc3 bytecode --- python-pycotap.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pycotap.spec b/python-pycotap.spec index b0d4050..aea5e80 100644 --- a/python-pycotap.spec +++ b/python-pycotap.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 1.3.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A tiny test runner that outputs TAP results to standard output License: MIT @@ -50,6 +50,9 @@ find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' %files -n python3-%{pypi_name} -f %{pyproject_files} %changelog +* Fri Sep 19 2025 Python Maint - 1.3.1-10 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 1.3.1-9 - Rebuilt for Python 3.14.0rc2 bytecode