Skip to content

Commit 7b2fe9a

Browse files
author
Josh Mervine
committed
making nose not required for travis
1 parent 7973653 commit 7b2fe9a

File tree

4 files changed

+26
-20
lines changed

4 files changed

+26
-20
lines changed

Makefile

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
# Setup
22
###
3-
target=build
4-
source=src
3+
target=$(PWD)/build
4+
source=$(PWD)/src
55

6-
pypath=PYTHONPATH=./$(target):./maxcdn:$(PYTHONPATH)
6+
pypath=PYTHONPATH=$(target):./maxcdn:$(PYTHONPATH)
77

8-
nose=./$(source)/nose/bin/nosetests
8+
nose_opts=-v
9+
nose=python $(source)/nose/bin/nosetests
10+
cov_opts= --with-coverage --cover-package=maxcdn
911

1012
tests=./test/test.py
1113
int=./test/int.py
12-
test_opts=-v
13-
cov_opts= --with-coverage --cover-package=maxcdn
14-
1514

1615
# Tasks
1716
###
@@ -27,21 +26,23 @@ clean:
2726
coverage: build/coverage
2827
$(pypath) python $(nose) $(cov_opts) $(tests)
2928

30-
test:
31-
$(pypath) python $(nose) $(test_opts) $(tests)
29+
nose: build/nose
30+
$(pypath) $(nose) $(nose_opts) $(tests)
3231

33-
int:
34-
$(pypath) python $(nose) $(test_opts) $(int)
32+
nose/int: build/nose
33+
$(pypath) $(nose) $(nose_opts) $(int)
3534

36-
test/help:
37-
$(nose) --help | less
35+
test:
36+
$(pypath) python $(tests)
37+
38+
test/32:
39+
$(pypath) python3.2 $(tests)
3840

39-
# TODO: support 3.x
40-
#test/32:
41-
#$(pypath) python3.2 $(nose) $(test_opts) $(tests)
41+
test/33:
42+
$(pypath) python3.3 $(tests)
4243

43-
#test/33:
44-
#$(pypath) python3.3 $(nose) $(test_opts) $(tests)
44+
int:
45+
$(pypath) python $(test_opts) $(int)
4546

4647
travis: setup test
4748

@@ -51,5 +52,7 @@ distribute:
5152
build/coverage:
5253
pip install coverage -t $(target) -b $(source)
5354

54-
.PHONY: init clean test coverage test/help test/32 test/33
55+
build/nose:
56+
pip install nose -t $(target) -b $(source)
5557

58+
.PHONY: init clean test coverage test/help test/32 test/33

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
requests
22
requests_oauthlib
33
certifi
4-
nose
54
mock

test/int.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ def test_purge(self):
4747
self.assertEqual(200, self.max.purge(zone, popularfiles[0]["uri"])["code"])
4848
self.assertEqual(200, self.max.purge(zone, [ popularfiles[0]["uri"], popularfiles[1]["uri"]])["code"])
4949

50+
if __name__ == '__main__':
51+
unittest.main()

test/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,5 @@ def test_purge(self):
100100
self.assertEqual(self.maxcdn.purge(12345, ["/master.css", "/other.css"]),
101101
{ "code": 200, "method": "delete", "data": { "foo":"bar" } })
102102

103+
if __name__ == '__main__':
104+
unittest.main()

0 commit comments

Comments
 (0)