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

adding generate_a_HtmlFile_from_mdFile test #17

Merged
merged 5 commits into from
Nov 26, 2021

Conversation

hphan9
Copy link

@hphan9 hphan9 commented Nov 22, 2021

Hi Qiwen-Yu, I added 1 test to check if an HTML file will be generated in the expected destination if the user passes in an MD file.
Thank you :)

@Qiwen-Yu
Copy link
Owner

Hi Qiwen-Yu, I added 1 test to check if an HTML file will be generated in the expected destination if the user passes in an MD file. Thank you :)

Thank you for your PR.

Copy link
Owner

@Qiwen-Yu Qiwen-Yu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test did not pass. I think the reason is the destination ../TextHTMLPress/dist does not exist on GitHub.

test.py Outdated
lang = "fr"
g=Generator(inp,output,stylesheet,lang)
g.parse_markdown(inp)
assert expectedOutputFile.exists()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above line might be changed something as """<title>Zen</title>

Somebody

2021-10-15

Zen

Section 1

Simple is better than complex.

Although practicality beats purity.

Section 2

Need more practice.

"""

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is so strange when I test it local and all tests pass

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got it, I forgot to generate wrapper in the test

@Qiwen-Yu
Copy link
Owner

I will merge now, but I am wondering if we should remove the expectedOutputFile first such as shutil.rmtree(expectedOutputFile), then use the Generator, and finally use assert to check.

@Qiwen-Yu Qiwen-Yu merged commit 907ed9b into Qiwen-Yu:main Nov 26, 2021
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

Successfully merging this pull request may close these issues.

2 participants