Skip to content

Commit

Permalink
update to remove conflict with using README.md file as a test. File a…
Browse files Browse the repository at this point in the history
…lready exists in travis environment
  • Loading branch information
mmcky committed Feb 22, 2017
1 parent 302934b commit c5c90c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions quantecon/util/tests/test_file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a Simple Test File for test_notebooks.py
11 changes: 6 additions & 5 deletions quantecon/util/tests/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,28 @@
import unittest
import os

FILES = ['README.md']
FILES = ['test_file.md']
REPO = "https://github.com/QuantEcon/QuantEcon.py"
RAW = "raw"
BRANCH = "master"
FOLDER = "quantecon/util/tests/"

class TestNotebookUtils(unittest.TestCase):

def test_fetch_nb_dependencies(self):
"""
Run First and Test Download
"""
status = fetch_nb_dependencies(files=FILES, repo=REPO, raw=RAW, branch=BRANCH)
status = fetch_nb_dependencies(files=FILES, repo=REPO, raw=RAW, branch=BRANCH, folder=FOLDER)
self.assertFalse(False in status)

def test_fetch_nb_dependencies_overwrite(self):
"""
Run Second and Ensure file is skipped by checking a False is found in status
"""
status = fetch_nb_dependencies(files=FILES, repo=REPO, raw=RAW, branch=BRANCH) #First will succeed
status = fetch_nb_dependencies(files=FILES, repo=REPO, raw=RAW, branch=BRANCH) #Second should skip
status = fetch_nb_dependencies(files=FILES, repo=REPO, raw=RAW, branch=BRANCH, folder=FOLDER) #First will succeed
status = fetch_nb_dependencies(files=FILES, repo=REPO, raw=RAW, branch=BRANCH, folder=FOLDER) #Second should skip
self.assertTrue(False in status)

def tearDown(self):
os.remove("README.md")
os.remove("test_file.md")

0 comments on commit c5c90c1

Please # to comment.