Fix formatting with black · RDFLib/rdflib@636a193 (original) (raw)

`@@ -2,14 +2,20 @@

`

2

2

``

3

3

``

4

4

`def test_norm_urn():

`

5

``

`-

assert norm_url('urn:ns:test', '/one') == 'urn:ns:test/one'

`

6

``

`-

assert norm_url('urn:ns:test/path/', 'two') == 'urn:ns:test/path/two'

`

7

``

`-

assert norm_url('urn:ns:test/path', 'two') == 'urn:ns:test/two'

`

8

``

`-

assert norm_url('urn:ns:test', 'three') == 'urn:ns:test/three'

`

9

``

`-

assert norm_url('urn:ns:test/path#', 'four') == 'urn:ns:test/four'

`

10

``

`-

assert norm_url('urn:ns:test/path1/path2/', '../path3') == 'urn:ns:test/path1/path3'

`

11

``

`-

assert norm_url('urn:ns:test/path1/path2/', '/path3') == 'urn:ns:test/path3'

`

12

``

`-

assert norm_url('urn:ns:test/path1/path2/', 'http://example.com') == 'http://example.com'

`

13

``

`-

assert norm_url('urn:ns:test/path1/path2/', 'urn:another:test/path') == 'urn:another:test/path'

`

14

``

`-

assert norm_url('urn:ns:test/path', '#four') == 'urn:ns:test/path#four'

`

15

``

`-

assert norm_url('urn:ns:test/path/', '#four') == 'urn:ns:test/path/#four'

`

``

5

`+

assert norm_url("urn:ns:test", "/one") == "urn:ns:test/one"

`

``

6

`+

assert norm_url("urn:ns:test/path/", "two") == "urn:ns:test/path/two"

`

``

7

`+

assert norm_url("urn:ns:test/path", "two") == "urn:ns:test/two"

`

``

8

`+

assert norm_url("urn:ns:test", "three") == "urn:ns:test/three"

`

``

9

`+

assert norm_url("urn:ns:test/path#", "four") == "urn:ns:test/four"

`

``

10

`+

assert norm_url("urn:ns:test/path1/path2/", "../path3") == "urn:ns:test/path1/path3"

`

``

11

`+

assert norm_url("urn:ns:test/path1/path2/", "/path3") == "urn:ns:test/path3"

`

``

12

`+

assert (

`

``

13

`+

norm_url("urn:ns:test/path1/path2/", "http://example.com")

`

``

14

`+

== "http://example.com"

`

``

15

`+

)

`

``

16

`+

assert (

`

``

17

`+

norm_url("urn:ns:test/path1/path2/", "urn:another:test/path")

`

``

18

`+

== "urn:another:test/path"

`

``

19

`+

)

`

``

20

`+

assert norm_url("urn:ns:test/path", "#four") == "urn:ns:test/path#four"

`

``

21

`+

assert norm_url("urn:ns:test/path/", "#four") == "urn:ns:test/path/#four"

`