diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-03-20 08:27:30 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-03-20 08:27:30 -0400 |
commit | 7632f4c60b5fbc856beea7607ce2b448f6b5bbbc (patch) | |
tree | 6df71b122ddad823f028b3b36a42db34b87b7f0e /test | |
parent | e305b35c2a116b4195e79a1da9e6eab9b6013295 (diff) | |
download | python-coveragepy-git-7632f4c60b5fbc856beea7607ce2b448f6b5bbbc.tar.gz |
Calculate the pid suffix for data files at the end of the process so that programs calling os.fork will collect data from both child and parent. Fixes issue #56.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_data.py | 8 | ||||
-rw-r--r-- | test/test_process.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/test_data.py b/test/test_data.py index 4f784253..83a5b8ae 100644 --- a/test/test_data.py +++ b/test/test_data.py @@ -55,13 +55,13 @@ class DataTest(CoverageTest): self.assert_summary(covdata2, SUMMARY_1) def test_combining(self): - covdata1 = CoverageData(suffix='1') + covdata1 = CoverageData() covdata1.add_line_data(DATA_1) - covdata1.write() + covdata1.write(suffix='1') - covdata2 = CoverageData(suffix='2') + covdata2 = CoverageData() covdata2.add_line_data(DATA_2) - covdata2.write() + covdata2.write(suffix='2') covdata3 = CoverageData() covdata3.combine_parallel_data() diff --git a/test/test_process.py b/test/test_process.py index 501075df..1f8a9884 100644 --- a/test/test_process.py +++ b/test/test_process.py @@ -227,7 +227,7 @@ class ProcessTest(CoverageTest): self.assertEqual(out, 'Child!\n') self.assertFalse(os.path.exists(".coverage")) - # After running the forking program, there should be two + # After running the forking program, there should be two # .coverage.machine.123 files. self.assertEqual(self.number_of_data_files(), 2) |