From c5c90c1948eb380a93c7a3c7927032f5279a7ac1 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 23 Feb 2017 10:42:13 +1100 Subject: [PATCH] update to remove conflict with using README.md file as a test. File already exists in travis environment --- quantecon/util/tests/test_file.md | 1 + quantecon/util/tests/test_notebooks.py | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 quantecon/util/tests/test_file.md diff --git a/quantecon/util/tests/test_file.md b/quantecon/util/tests/test_file.md new file mode 100644 index 000000000..3ec45702f --- /dev/null +++ b/quantecon/util/tests/test_file.md @@ -0,0 +1 @@ +This is a Simple Test File for test_notebooks.py \ No newline at end of file diff --git a/quantecon/util/tests/test_notebooks.py b/quantecon/util/tests/test_notebooks.py index 298c59289..8e39e2dab 100644 --- a/quantecon/util/tests/test_notebooks.py +++ b/quantecon/util/tests/test_notebooks.py @@ -11,10 +11,11 @@ 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): @@ -22,16 +23,16 @@ 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") \ No newline at end of file + os.remove("test_file.md") \ No newline at end of file