-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
654f469
commit 94a88a1
Showing
2 changed files
with
72 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,56 @@ | ||
import sys | ||
import os | ||
|
||
from remarkable import cli | ||
from . import BaseTestCase | ||
|
||
from remarkable import remarkable | ||
|
||
MARKDOWN = """ | ||
name: inverse | ||
layout: true | ||
class: center, middle, inverse | ||
--- | ||
# Application To Platform | ||
.footnote[ | ||
[How we used Python to scale Yola] | ||
(https://github.com/michaeljoseph/application-to-platform) | ||
] | ||
--- | ||
layout: false | ||
background-image: url(https://raw.github.com/michaeljoseph/application-to-platform/gh-pages/images/yola-logo.png) | ||
.large[ | ||
![avatar](https://raw.github.com/michaeljoseph/application-to-platform/gh-pages/images/avatar.png) | ||
michaeljoseph @github @twitter | ||
] | ||
??? | ||
.small[ | ||
# excuses | ||
- false pretences: backup speaker | ||
- 4 day talk | ||
- crappy slides: squirrel (show remark / reveal) | ||
- we're hiring, let me convince you / swimming the recruitment and hiring manager infested nerdpool during the break | ||
we have business cards | ||
] | ||
--- | ||
""" | ||
|
||
|
||
class TestRemarkable(BaseTestCase): | ||
|
||
def test_something(self): | ||
self.assertEquals( | ||
'Hello World!', | ||
remarkable(), | ||
) | ||
def setUp(self): | ||
self.example_file = 'atp.md' | ||
with open(self.example_file, 'w') as f: | ||
f.write(MARKDOWN) | ||
|
||
def tearDown(self): | ||
os.remove(self.example_file) | ||
os.remove('%s.html' % self.example_file) | ||
|
||
def test_remark(self): | ||
sys.argv = 'remarkable remark atp.md'.split(' ') | ||
cli.main() | ||
self.assertTrue(os.path.exists('%s.html' % self.example_file)) |