Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests and Examples fail #6

Open
gingerbeardman opened this issue Jun 24, 2019 · 1 comment
Open

Tests and Examples fail #6

gingerbeardman opened this issue Jun 24, 2019 · 1 comment

Comments

@gingerbeardman
Copy link

gingerbeardman commented Jun 24, 2019

Any ideas? I'm a novice at Python.

After install...

I try to run an example, it fails:

python example_markdownwriter.py 
Traceback (most recent call last):
  File "example_markdownwriter.py", line 8, in <module>
    md = MarkdownWriter()
NameError: name 'MarkdownWriter' is not defined

I try to run the tests, they fail:

matt@matt:~/Downloads/2019-06-24/python-markup-writer-master$ ./setup.py test
running test
Searching for unittest2
Best match: unittest2 1.1.0
Processing unittest2-1.1.0-py3.7.egg

Using /Users/matt/Downloads/2019-06-24/python-markup-writer-master/.eggs/unittest2-1.1.0-py3.7.egg
Searching for traceback2
Best match: traceback2 1.4.0
Processing traceback2-1.4.0-py3.7.egg

Using /Users/matt/Downloads/2019-06-24/python-markup-writer-master/.eggs/traceback2-1.4.0-py3.7.egg
Searching for argparse
Best match: argparse 1.4.0
Processing argparse-1.4.0-py3.7.egg

Using /Users/matt/Downloads/2019-06-24/python-markup-writer-master/.eggs/argparse-1.4.0-py3.7.egg
Searching for linecache2
Best match: linecache2 1.0.0
Processing linecache2-1.0.0-py3.7.egg

Using /Users/matt/Downloads/2019-06-24/python-markup-writer-master/.eggs/linecache2-1.0.0-py3.7.egg
/usr/local/lib/python3.7/site-packages/setuptools/dist.py:727: UserWarning: Module argparse was already imported from /usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/argparse.py, but /Users/matt/Downloads/2019-06-24/python-markup-writer-master/.eggs/argparse-1.4.0-py3.7.egg is being added to sys.path
  pkg_resources.working_set.add(dist, replace=True)
running egg_info
writing MarkupWriter.egg-info/PKG-INFO
writing dependency_links to MarkupWriter.egg-info/dependency_links.txt
writing top-level names to MarkupWriter.egg-info/top_level.txt
reading manifest file 'MarkupWriter.egg-info/SOURCES.txt'
writing manifest file 'MarkupWriter.egg-info/SOURCES.txt'
running build_ext
test_addCodeBlock1 (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addCodeBlock2 (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addCodeWord (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addDoubleLineBreak (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addHeader (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addHeader0 (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addHeader7 (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addHorizontalRule (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addImage (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addLink1 (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addLink2 (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addList (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addListNegTab (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addParagraph (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addParagraphNegTab (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addSimpleLineBreak (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addSpace (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addStringToList (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addTabulation (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_addText (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_getStream (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_getStylizedText (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_tableHeadersAndRows (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_tableHeadersOnly (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_tableRaises (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_transformSpecialCharacters (tests.test_markdownwriter.TestMarkdownWriter) ... ERROR
test_pandocmarkdownwriter (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: test_addCodeBlock1 (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addCodeBlock2 (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addCodeWord (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addDoubleLineBreak (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addHeader (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addHeader0 (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addHeader7 (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addHorizontalRule (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addImage (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addLink1 (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addLink2 (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addList (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addListNegTab (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addParagraph (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addParagraphNegTab (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addSimpleLineBreak (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addSpace (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addStringToList (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addTabulation (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_addText (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_getStream (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_getStylizedText (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_tableHeadersAndRows (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_tableHeadersOnly (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_tableRaises (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_transformSpecialCharacters (tests.test_markdownwriter.TestMarkdownWriter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_markdownwriter.py", line 13, in setUp
    self.md = MarkdownWriter()
TypeError: 'module' object is not callable

======================================================================
ERROR: test_pandocmarkdownwriter (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_pandocmarkdownwriter
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/Users/matt/Downloads/2019-06-24/python-markup-writer-master/tests/test_pandocmarkdownwriter.py", line 1, in <module>
    from pandocmarkdownwriter import PandocMarkdownTable, PandocMarkdownWriter
  File "/usr/local/lib/python3.7/site-packages/pandocmarkdownwriter/__init__.py", line 2, in <module>
    from PandocMarkdownWriter import *
ModuleNotFoundError: No module named 'PandocMarkdownWriter'


----------------------------------------------------------------------
Ran 27 tests in 0.006s

FAILED (errors=27)
Test failed: <unittest.runner.TextTestResult run=27 errors=27 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=27 errors=27 failures=0>
matt@matt:~/Downloads/2019-06-24/python-markup-writer-master$ 
@valnoel
Copy link
Contributor

valnoel commented Oct 24, 2019

Hello @gingerbeardman
Sorry for the delay, but it seems your version of Python is the 3.7.
This project was initialized for Python 2.6 & 2.7. A few changes have been introduced to support Python 3.x, but it seems not to be completed...
I open a new issue #9 to fix this, but do not hesitate to propose modifications :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants