From 7f6c9ef2bb7d5899aaba83446092c38e49878c55 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sun, 18 Feb 2018 16:32:44 +0000 Subject: tests: Add test for TWRenderer.paragraph. * tests/data/renderer-paragraphs-w.md: New file. * tests/data/renderer-paragraphs.md: New file. * tests/test_md_tw.py (TestTWRenderer)[test_render_paragraph]: Test for TWRenderer.paragraph. [setup, teardown]: Update methods. [_write_tmp, _get, _md, _validate]: New methods. --- tests/data/renderer-paragraphs-w.md | 25 +++++++++++++++++++++++++ tests/data/renderer-paragraphs.md | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 tests/data/renderer-paragraphs-w.md create mode 100644 tests/data/renderer-paragraphs.md (limited to 'tests/data') diff --git a/tests/data/renderer-paragraphs-w.md b/tests/data/renderer-paragraphs-w.md new file mode 100644 index 0000000..c2078bd --- /dev/null +++ b/tests/data/renderer-paragraphs-w.md @@ -0,0 +1,25 @@ +He used to say that there are only two sources of human vice—idleness +and superstition, and only two virtues—activity and intelligence. He +himself undertook his daughter's education, and to develop these two +cardinal virtues in her gave her lessons in algebra and geometry till +she was twenty, and arranged her life so that her whole time was +occupied. He was himself always occupied: writing his memoirs, solving +problems in higher mathematics, turning snuffboxes on a lathe, working +in the garden, or superintending the building that was always going on +at his estate. + +“Mere mobs!” repeated his new friend with a snort of scorn. “So you talk +about mobs and the working classes as if they were the question. You’ve +got that eternal idiotic idea that if anarchy came it would come from +the poor. Why should it? The poor have been rebels, but they have never +been anarchists; they have more interest than anyone else in there being +some decent government. The poor man really has a stake in the country. +The rich man hasn’t; he can go away to New Guinea in a yacht. The poor +have sometimes objected to being governed badly; the rich have always +objected to being governed at all. Aristocrats were always anarchists, +as you can see from the barons’ wars.” + +Thanking You in Advance. This sounds as if the writer meant, "It will +not be worth my while to write to you again." In making your request, +write, "Will you please," or "I shall be obliged," and if anything +further seems necessary write a letter of acknowledgment later. diff --git a/tests/data/renderer-paragraphs.md b/tests/data/renderer-paragraphs.md new file mode 100644 index 0000000..e809160 --- /dev/null +++ b/tests/data/renderer-paragraphs.md @@ -0,0 +1,18 @@ +He used to say that there are only two sources of human vice—idleness and superstition, and only two +virtues—activity and intelligence. He himself undertook his daughter's education, and to develop +these two cardinal virtues in her gave her lessons in algebra and geometry till she was twenty, and +arranged her life so that her whole time was occupied. He was himself always occupied: writing his +memoirs, solving problems in higher mathematics, turning snuffboxes on a lathe, working in the +garden, or superintending the building that was always going on at his estate. + +“Mere mobs!” repeated his new friend with a snort of scorn. “So you talk about mobs and the working +classes as if they were the question. You’ve got that eternal idiotic idea that if anarchy came it +would come from the poor. Why should it? The poor have been rebels, but they have never been +anarchists; they have more interest than anyone else in there being some decent government. The poor +man really has a stake in the country. The rich man hasn’t; he can go away to New Guinea in a +yacht. The poor have sometimes objected to being governed badly; the rich have always objected to +being governed at all. Aristocrats were always anarchists, as you can see from the barons’ wars.” + +Thanking You in Advance. This sounds as if the writer meant, "It will not be worth my while to write +to you again." In making your request, write, "Will you please," or "I shall be obliged," and if +anything further seems necessary write a letter of acknowledgment later. -- cgit v1.2.3