File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 3
3
.settings
4
4
.project
5
5
.pydevproject
6
+ .coverage
7
+ cover
6
8
Original file line number Diff line number Diff line change
1
+ # TODO: maybe add all source files as dependeencies and so on...
2
+ #
3
+ all :
4
+ @echo " nothing here yet"
5
+
6
+ test :
7
+ nosetests -vvs --with-coverage --cover-html
8
+
9
+ clean :
10
+ rm -rvf cover/
11
+
12
+ .PHONY : all test clean
13
+
Original file line number Diff line number Diff line change
1
+ """
2
+ Unit tests for TTLDict
3
+ """
4
+
5
+ from unittest import TestCase
6
+ from ttldict import TTLDict
7
+
8
+
9
+ class TTLDictTest (TestCase ):
10
+ """ TTLDict tests """
11
+ def test_simple_no_ttl (self ):
12
+ """ Test simple usage """
13
+ ttl_dict = TTLDict (None )
14
+ orig_dict = {'hello' : 'world' , 'intval' : 3 }
15
+ ttl_dict .update (orig_dict )
16
+ self .assertEqual (sorted (orig_dict .items ()), sorted (ttl_dict .items ()))
You can’t perform that action at this time.
0 commit comments