File: test_issue_139.py

package info (click to toggle)
python-sure 2.0.1%2Bgit.2023.02.06.3aef950b7c-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 744 kB
  • sloc: python: 3,512; makefile: 255; sh: 12
file content (21 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- coding: utf-8 -*-

"""
Test fix of bug described in GitHub Issue #139.
"""

from sure import expect


def test_issue_139():
    "Test for GitHub Issue #139"
    # test with big epsilon
    expect(1.).should.equal(5., 4.)

    # shouldn't raise IndexError: tuple index out of range
    try:
        expect(1.).should.equal(5., 3.)
    except AssertionError:
        pass
    else:
        raise RuntimeError('should not be equal')