Skip to content

Commit

Permalink
removes dependency to six module
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfalcao committed Jan 4, 2024
1 parent b1e3ee1 commit cea8766
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 22 deletions.
7 changes: 1 addition & 6 deletions docs/source/assertion-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,7 @@ instance of it

.. code:: python
from six import PY3
if PY3:
u"".should.be.an(str)
else:
u"".should.be.an(unicode)
"".should.be.an(str)
[].should.be.a(list)
``.be.above(num) and .be.below(num)``
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
six==1.16.0
click==8.1.7
couleur==0.7.4
coverage==7.3.3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def read_readme():
return __doc__


install_requires = ["mock", "six", "coverage==7.3.3", "click==8.1.7", "couleur==0.7.4"]
install_requires = ["mock", "coverage==7.3.3", "click==8.1.7", "couleur==0.7.4"]
tests_require = []
version = read_version()

Expand Down
11 changes: 2 additions & 9 deletions tests/issues/test_issue_134.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"""

from sure import expect
from six import PY2


def test_issue_132():
Expand Down Expand Up @@ -50,19 +49,13 @@ def __great_test_4():
def __great_test_bytes():
expect(b'hello{42world }}').should.be.equal(b'hello{42foo }}')

if PY2:
error_msg = "X is 'hello{42world }}' whereas Y is 'hello{42foo }}'"
else:
error_msg = "X is b'hello{42world }}' whereas Y is b'hello{42foo }}'"
error_msg = "X is b'hello{42world }}' whereas Y is b'hello{42foo }}'"

expect(__great_test_bytes).when.called.to.throw(AssertionError, error_msg)

def __great_test_unicode():
expect(u'hello{42world }}').should.be.equal(u'hello{42foo }}')

if PY2:
error_msg = "X is u'hello{42world }}' whereas Y is u'hello{42foo }}'"
else:
error_msg = "X is 'hello{42world }}' whereas Y is 'hello{42foo }}'"
error_msg = "X is 'hello{42world }}' whereas Y is 'hello{42foo }}'"

expect(__great_test_unicode).when.called.to.throw(AssertionError, error_msg)
9 changes: 4 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# and then run "tox" from this directory.

[tox]
envlist = py27, pypy, py34, py35, py36, py37
envlist = py36, py37, py38, py39, py310, py311, py312

[testenv]
commands = nosetests --rednose -vv --with-coverage --cover-package=sure
deps =
six
mock
nose
rednose
click
couleur
coverage
mock

0 comments on commit cea8766

Please sign in to comment.