stevematney / redgreenunittests

Literally exactly like Python's unittest but with colors.
17 stars 5 forks source link

NameError: name 'basestring' is not defined #8

Open NathanUrwin opened 6 years ago

NathanUrwin commented 6 years ago
(env) $ python --version
Python 3.6.4

(env) $ pip --version
pip 9.0.1 from /home/user/Projects/.sandbox/python-tdd-book/env/lib/python3.6/site-packages (python 3.6)

(env) $ pip freeze
chromedriver-binary==2.35.0
Django==2.0.2
Pygments==2.2.0
pytz==2018.3
redgreenunittest==0.1.1
selenium==3.9.0

(env) $ python functional_tests.py
Traceback (most recent call last):
  File "functional_tests.py", line 62, in <module>
    unittest.main()
  File "/home/user/Projects/.sandbox/python-tdd-book/env/lib/python3.6/site-packages/redgreenunittest/main.py", line 78, in __init__
    if isinstance(module, basestring):
NameError: name 'basestring' is not defined

Here's a solution to a similar issue in another project

stevematney commented 6 years ago

Hi @nathanurwin! Thanks for the report! This is all really helpful. Would it be possible to provide a very small test and code example to duplicate this error?

NathanUrwin commented 6 years ago

Hey @stevematney :wave: Glad to help! For sure, check out the functional_tests.py. I'm farther along in the tutorial now where instead of calling python functional_tests.py the tests are ran through the Django test runner, i.e. python manage.py test functional_tests and everything is working great! :ok_hand: