• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / zope.contenttype
100%

Build:
DEFAULT BRANCH: master
Repo Added 03 Aug 2017 01:13PM UTC
Files 6
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • 4.3.0
  • 4.4
  • 4.5.0
  • 4.6
  • 5.0
  • 5.1
  • 5.2
  • 6.0
  • Python3.7support
  • config-with-pure-python
  • config-with-pure-python-template-18bd2267
  • config-with-pure-python-template-2441c55b
  • config-with-pure-python-template-4016108d
  • config-with-pure-python-template-76e81852
  • config-with-pure-python-template-b21fbbf2
  • config-with-pure-python-template-d686a14e
  • docs
  • issue_21
  • master
  • more-types
  • pep-420-native-namespace
  • py36
  • strict_False

08 Dec 2025 06:52AM UTC coverage: 100.0%. Remained the same
20019365221

push

github

web-flow
tests: adjust mime type expectations for .rtf (#22)

The test checks the mime type of .rtf filename. The check is based
on stdlib's `mimetypes.guess_type(name, strict=False)` which in
turn depends on provider of mime types mapping.
CPython's default mapping for rtf:
https://github.com/python/cpython/blob/3.14/Lib/mimetypes.py#L650
https://github.com/python/cpython/blob/3.14/Lib/mimetypes.py#L678-L683

$ python3 -c 'import mimetypes; mimetypes.knownfiles=[]; mimetypes.init(); print(mimetypes.types_map[".rtf"])'
text/rtf

`mimetypes` tries next providers of mime data by default:
$ python3 -c 'import mimetypes; print(mimetypes.knownfiles)'
['/etc/mime.types', '/etc/httpd/mime.types', '/etc/httpd/conf/mime.types', '/etc/apache/mime.types', '/etc/apache2/mime.types', '/usr/local/etc/httpd/conf/mime.types', '/usr/local/lib/netscape/mime.types', '/usr/local/etc/httpd/conf/mime.types', '/usr/local/etc/mime.types']

With installed /etc/mime.types (mailcap):
$ python3 -c 'import mimetypes; mimetypes.init(); print(mimetypes.types_map[".rtf"])'
application/rtf

According to https://www.iana.org/assignments/media-types/media-types.xhtml
both are possible.

Fixes: https://github.com/zopefoundation/zope.contenttype/issues/21

Signed-off-by: Stanislav Levin <slev@altlinux.org>
Co-authored-by: Michael Howitz <icemac@gmx.net>

46 of 46 branches covered (100.0%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

287 of 287 relevant lines covered (100.0%)

1.0 hits per line

Relevant lines Covered
Build:
Build:
287 RELEVANT LINES 287 COVERED LINES
1.0 HITS PER LINE
Source Files on master
  • Tree
  • List 6
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
20019365221 master tests: adjust mime type expectations for .rtf (#22) The test checks the mime type of .rtf filename. The check is based on stdlib's `mimetypes.guess_type(name, strict=False)` which in turn depends on provider of mime types mapping. CPython's defau... push 08 Dec 2025 06:52AM UTC web-flow github
100.0
19956802631 issue_21 Merge 3e3119bf7 into 5dab09449 Pull #22 08 Dec 2025 06:51AM UTC web-flow github
100.0
20003966723 master Update Python version support. (#23) * Drop support for Python 3.9. * Add support for Python 3.14. * Configuring for pure-python * Update Python version support. * Update pyproject.toml push 07 Dec 2025 12:50PM UTC web-flow github
100.0
19956764226 master Update Python version support. (#23) * Drop support for Python 3.9. * Add support for Python 3.14. * Configuring for pure-python * Update Python version support. * Update pyproject.toml push 05 Dec 2025 08:09AM UTC web-flow github
100.0
19956378169 config-with-pure-python-template-76e81852 Update pyproject.toml Pull #23 05 Dec 2025 07:50AM UTC web-flow github
100.0
19956357027 config-with-pure-python-template-76e81852 Update Python version support. push 05 Dec 2025 07:49AM UTC icemac github
100.0
19859765280 issue_21 Merge a1f965fb1 into 54e372e15 Pull #22 03 Dec 2025 04:27PM UTC web-flow github
100.0
19798648661 master Back to development: 6.1 push 30 Nov 2025 12:50PM UTC icemac github
100.0
19610904723 master Back to development: 6.1 push 23 Nov 2025 01:02PM UTC icemac github
100.0
19423630687 master Back to development: 6.1 push 17 Nov 2025 08:52AM UTC icemac github
100.0
See All Builds (237)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc