This repository has been archived by the owner on Aug 9, 2019. It is now read-only.
-
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
0 parents
commit 8606e60
Showing
7 changed files
with
70 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
*.pyc |
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Imports | ||
|
||
|
||
class Crawler(object): | ||
"Base crawler class." | ||
pass | ||
|
||
|
||
class MyAnimeListCrawler(Crawler): | ||
pass | ||
|
||
|
||
class datCrawl(object): | ||
def __init__(self): | ||
self.crawlers = [] | ||
self.foo = 'bar' | ||
|
||
def registerCrawler(self, crawler): | ||
#crawler = crawler.asd2243 | ||
pass | ||
|
||
def registerUrl(self): | ||
pass |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
__author__ = 'fmartin' |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import unittest | ||
from datCrawl import base | ||
|
||
|
||
class datCrawlTests(unittest.TestCase): | ||
|
||
def test_instance_check(self): | ||
try: | ||
core = base.datCrawl | ||
except Exception, e: | ||
print e | ||
print core | ||
self.assertTrue(core) | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Requires | ||
var watchr = require('watchr'); | ||
var sys = require('sys'); | ||
var exec = require('child_process').exec; | ||
var child; | ||
|
||
// Start watching files | ||
process.stdout.write('\u001B[2J\u001B[0;0f'); | ||
console.log('Unit Testing: Make changes on a file to start tests.'); | ||
watchr.watch({ | ||
paths: ['./datCrawl', './test'], | ||
listeners: { | ||
change: function(changeType, filePath, fileCurrentStat, filePreviousStat) { | ||
if (filePath.substr(-3) === ".py") { | ||
//sys.print('##############################################\n'); | ||
process.stdout.write('\u001B[2J\u001B[0;0f'); | ||
exec("python -m unittest discover", | ||
function (error, stdout, stderr) { | ||
sys.print(stderr); | ||
} | ||
); | ||
} | ||
}, | ||
error: function(err) { | ||
console.log('an error occured:', err); | ||
} | ||
} | ||
}); |