Compare commits

...
Sign in to create a new pull request.

22 commits

Author SHA1 Message Date
Python Maint
6be50fb74d Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 14:03:58 +02:00
Python Maint
2e0144badd Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 14:28:17 +02:00
Fedora Release Engineering
ec3fad94bf Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 09:33:21 +00:00
Shlomi Fish
1afe2ec237 deprecated macros [ RHBZ#2378026 ] 2025-07-09 05:52:26 +03:00
Shlomi Fish
e5fa98bc82 deprecated macros [ RHBZ#2378026 ] 2025-07-09 05:49:08 +03:00
Python Maint
8fd88ca7a2 Rebuilt for Python 3.14 2025-06-02 20:35:25 +02:00
Shlomi Fish
91ceded8a2 update stale URL 2025-02-13 19:53:34 +02:00
Fedora Release Engineering
cdc6c05e87 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 17:37:55 +00:00
Takao Fujiwara
488eb5dbbd Rebuilt for CI 2024-10-12 01:26:41 +09:00
Takao Fujiwara
7f31276577 Add CI TMT 2024-10-12 01:23:34 +09:00
Takao Fujiwara
18333d7f24 Delete CI STI 2024-10-12 01:22:26 +09:00
Fedora Release Engineering
9a8a210796 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 14:23:16 +00:00
Shlomi Fish
778897daf8 New upstream release ( RHBZ#2297455 )
New upstream release ( https://bugzilla.redhat.com/show_bug.cgi?id=2297455 )
2024-07-12 13:31:24 +03:00
Python Maint
022aa81efd Rebuilt for Python 3.13 2024-06-07 08:58:32 +02:00
Fedora Release Engineering
32827d6145 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 08:26:05 +00:00
Fedora Release Engineering
6d391041b3 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 05:25:45 +00:00
Parag Nemade
00210b6359
Mark this as SPDX license expression converted 2023-08-21 10:12:13 +05:30
Fedora Release Engineering
54db8c6f1c Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 12:37:42 +00:00
Python Maint
7ec4001d1d Rebuilt for Python 3.12 2023-06-13 20:48:45 +02:00
Fedora Release Engineering
c605f8430f Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 15:58:57 +00:00
Fedora Release Engineering
b4a28133f2 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 21:09:33 +00:00
Python Maint
b0502d4b10 Rebuilt for Python 3.11 2022-06-13 15:14:55 +02:00
10 changed files with 132 additions and 82 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

1
.gitignore vendored
View file

@ -1 +1,2 @@
/pycotap-1.1.0.tar.gz /pycotap-1.1.0.tar.gz
/pycotap-1.3.1.tar.gz

5
plans/test.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

View file

@ -1,18 +1,16 @@
# Created by pyp2rpm-3.3.2
%global pypi_name pycotap %global pypi_name pycotap
Name: python-%{pypi_name} Name: python-%{pypi_name}
Version: 1.1.0 Version: 1.3.1
Release: 12%{?dist} Release: 10%{?dist}
Summary: A tiny test runner that outputs TAP results to standard output Summary: A tiny test runner that outputs TAP results to standard output
License: MIT License: MIT
URL: https://el-tramo.be/pycotap URL: https://github.com/remko/pycotap
Source0: %{pypi_source} Source0: %{pypi_source}
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
%description %description
pycotap is a simple Python test runner for unit tests that outputs Test Anything 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} %package -n python3-%{pypi_name}
Summary: %{summary} Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name} %description -n python3-%{pypi_name}
pycotap is a simple Python test runner for unit tests that outputs Test Anything pycotap is a simple Python test runner for unit tests that outputs Test Anything
@ -34,21 +31,82 @@ printers and processors.
%prep %prep
%autosetup -n %{pypi_name}-%{version} %autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info %generate_buildrequires
%pyproject_buildrequires
%build %build
%py3_build %pyproject_wheel
%install %install
%py3_install %pyproject_install
%pyproject_save_files %{pypi_name}
find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d' find %{buildroot}/%{python3_sitelib} -name '*.py' | xargs sed -i '/^#!/d'
%__rm -f %{buildroot}/usr/COPYING
%files -n python3-%{pypi_name} %check
%{python3_sitelib}/%{pypi_name} %pyproject_check_import
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%files -n python3-%{pypi_name} -f %{pyproject_files}
%changelog %changelog
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 1.3.1-10
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 1.3.1-9
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed Jul 09 2025 Shlomi Fish <shlomif@shlomifish.org> 1.3.1-7
- Stop using deprecated RPM macros ( https://bugzilla.redhat.com/show_bug.cgi?id=2378026 )
* Mon Jun 02 2025 Python Maint <python-maint@redhat.com> - 1.3.1-6
- Rebuilt for Python 3.14
* Thu Feb 13 2025 Shlomi Fish <shlomif@shlomifish.org> 1.3.1-5
- Update URL.
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Oct 11 2024 Takao Fujiwara <tfujiwar@redhat.com> 1.3.1-3
- Rebuilt for CI
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jul 12 2024 Shlomi Fish <shlomif@shlomifish.org> 1.3.1-1
- New upstream release ( https://bugzilla.redhat.com/show_bug.cgi?id=2297455 )
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1.1.0-21
- Rebuilt for Python 3.13
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Aug 21 2023 Parag Nemade <pnemade AT fedoraproject DOT org> - 1.1.0-18
- Mark this as SPDX license expression converted
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1.1.0-16
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.1.0-13
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-12 * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (pycotap-1.1.0.tar.gz) = dbe8d76c3e4b934dd4ff9ec0d48caafef3ae5583046a7316607b3c8cebf8cb920c68dc46487243aac81823994805c76f2be8ff0cbda593c70b70f268661fa289 SHA512 (pycotap-1.3.1.tar.gz) = e7d50340fb4e3f55037a96aaaba419e6753d4499564339b6562317455ed223c3fd93bf41d0bd9654c03a4bea09377daa192ca985bafc96983e4a2261dde348b8

5
tests/base/main.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Simple test of python-pycotap
test: ./test.sh
framework: beakerlib
require:
- python3-pycotap

37
tests/base/test.py Executable file
View file

@ -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()

9
tests/base/test.sh Executable file
View file

@ -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

View file

@ -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()

View file

@ -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