コード例 #1
0
 def test_twice_gets_only_first_generator(self):
     blk = get_block("blah", self.double_data, newline=None)
     assert isinstance(blk, collections.Iterator)
     assert list(blk) == ["", "another text", ""]
コード例 #2
0
 def test_block_not_found_generator(self):
     blk = get_block("something_not_used", self.data, newline=None)
     assert isinstance(blk, collections.Iterator)
     assert list(blk) == []
コード例 #3
0
 def test_twice_gets_only_first(self):
     assert get_block("blah", self.double_data) == "\nanother text\n"
コード例 #4
0
 def test_simple_named_block_generator(self):
     blk = get_block("blah", self.data, newline=None)
     assert isinstance(blk, collections.Iterator)
     assert list(blk) == ["", "some text", ""]
コード例 #5
0
 def test_block_not_found(self):
     assert get_block("something_not_used", self.data) == ""
コード例 #6
0
 def test_simple_named_block(self):
     assert get_block("blah", self.data) == "\nsome text\n"
コード例 #7
0
 def test_simple_named_block_custom_newline(self):
     assert get_block("blah", self.data, newline="\r\n") \
            == "\r\nsome text\r\n"
コード例 #8
0
ファイル: test_rest.py プロジェクト: samuelgrigolato/dose
 def test_twice_gets_only_first(self):
     assert get_block("blah", self.double_data) == "\nanother text\n"
コード例 #9
0
ファイル: test_rest.py プロジェクト: samuelgrigolato/dose
 def test_twice_gets_only_first_generator(self):
     blk = get_block("blah", self.double_data, newline=None)
     assert isinstance(blk, collections.Iterator)
     assert list(blk) == ["", "another text", ""]
コード例 #10
0
ファイル: test_rest.py プロジェクト: samuelgrigolato/dose
 def test_block_not_found_generator(self):
     blk = get_block("something_not_used", self.data, newline=None)
     assert isinstance(blk, collections.Iterator)
     assert list(blk) == []
コード例 #11
0
ファイル: test_rest.py プロジェクト: samuelgrigolato/dose
 def test_block_not_found(self):
     assert get_block("something_not_used", self.data) == ""
コード例 #12
0
ファイル: test_rest.py プロジェクト: samuelgrigolato/dose
 def test_simple_named_block_generator(self):
     blk = get_block("blah", self.data, newline=None)
     assert isinstance(blk, collections.Iterator)
     assert list(blk) == ["", "some text", ""]
コード例 #13
0
ファイル: test_rest.py プロジェクト: samuelgrigolato/dose
 def test_simple_named_block_custom_newline(self):
     assert get_block("blah", self.data, newline="\r\n") \
            == "\r\nsome text\r\n"
コード例 #14
0
ファイル: test_rest.py プロジェクト: samuelgrigolato/dose
 def test_simple_named_block(self):
     assert get_block("blah", self.data) == "\nsome text\n"