Skip to content
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fmartingr committed Mar 13, 2013
0 parents commit 8606e60
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
*.pyc
Empty file added README.md
Empty file.
Empty file added datCrawl/__init__.py
Empty file.
23 changes: 23 additions & 0 deletions datCrawl/base.py
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
1 change: 1 addition & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__author__ = 'fmartin'
16 changes: 16 additions & 0 deletions test/test_base.py
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()
28 changes: 28 additions & 0 deletions watcher.js
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);
}
}
});

0 comments on commit 8606e60

Please sign in to comment.