From 3fe9922d491fade632c9863e9e5569338961ba99 Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Fri, 6 Apr 2018 02:45:52 -0300 Subject: [PATCH] Fix failing test due to an invalid path --- .../services/youtube/YoutubeSubscriptionExtractorTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSubscriptionExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSubscriptionExtractorTest.java index 2ab515fd8..59c84636c 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSubscriptionExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeSubscriptionExtractorTest.java @@ -33,7 +33,9 @@ public class YoutubeSubscriptionExtractorTest { @Test public void testFromInputStream() throws Exception { - File testFile = new File("src/test/resources/youtube_export_test.xml"); + File testFile = new File("extractor/src/test/resources/youtube_export_test.xml"); + if (!testFile.exists()) testFile = new File("src/test/resources/youtube_export_test.xml"); + List subscriptionItems = subscriptionExtractor.fromInputStream(new FileInputStream(testFile)); assertTrue("List doesn't have exactly 8 items (had " + subscriptionItems.size() + ")", subscriptionItems.size() == 8);