Exemplo n.º 1
0
    def test_changing_attributes_changes_str(self):
        wm = WheelData()
        wm.generator = 'test'
        wm.root_is_purelib = False
        wm.tags = ['my-test-tag', 'another-test-tag']
        wm.build = 12345

        expected_contents = dedent("""\
            Wheel-Version: 1.0
            Generator: test
            Root-Is-Purelib: false
            Tag: my-test-tag
            Tag: another-test-tag
            Build: 12345

            """)

        assert str(wm) == expected_contents
Exemplo n.º 2
0
    def test_breaks_when_multiple_use_arg_is_given_a_single_string(self):
        wm = WheelData()
        wm.tags = "this is a tag"

        with pytest.raises(AssertionError):
            str(wm)