/breezy-debian/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy-debian/trunk

« back to all changes in this revision

Viewing changes to tests/test_upstream.py

  • Committer: Jelmer Vernooij
  • Date: 2018-10-10 21:43:37 UTC
  • Revision ID: jelmer@jelmer.uk-20181010214337-ffmg6a8np2ywc67h
Python3 compatibility fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
367
367
        self.assertTrue(src._export_watchfile() is not None)
368
368
 
369
369
    def test__xml_report_extract_upstream_version(self):
370
 
        self.assertEquals(b"1.2.9",
 
370
        self.assertEquals("1.2.9",
371
371
            UScanSource._xml_report_extract_upstream_version("""
372
372
<dehs>
373
373
<package>tdb</package>
1037
1037
            set(gather_orig_files("mypkg", "1.0", ".")))
1038
1038
 
1039
1039
    def test_utf8_invalid_file(self):
1040
 
        f = open("\xf6o.tar.gz", "w")
1041
 
        try:
 
1040
        with open("\xf6o.tar.gz", "w") as f:
1042
1041
            f.write("foo")
1043
 
        finally:
1044
 
            f.close()
1045
1042
        self.build_tree(["mypkg_1.0.orig.tar.gz"])
1046
1043
        self.assertEquals(
1047
1044
            [os.path.join(self.test_dir, "mypkg_1.0.orig.tar.gz")],